Arch Game Engine  0.2
Classes | Public Member Functions | Public Attributes | List of all members
Object Class Reference

This class stores information for an Object in the game. More...

#include <object.h>

Inheritance diagram for Object:
Inheritance graph
[legend]
Collaboration diagram for Object:
Collaboration graph
[legend]

Public Member Functions

SDL_Rect getBuff () const
 
SDL_Rect getMovedBuff () const
 
void actGravity (bool g)
 
void setDisplayable (bool d)
 This sets if you want the Object to visible on the screen by passing in a boolean.
 
bool isDisplayable (Object screen)
 Check if the Object is displayable by seeing if it is in a given screen.
 
virtual void checkDisplayable (Object screen)
 Checks if the Object is in the given screen.
 
void setCoord (double x, double y)
 Set the coordinate of the Object with a given x and y.
 
void setX (double sx)
 Set the x coordinate with a given x.
 
void setY (double sy)
 Set the y coordinate with a given y.
 
void move (double x, double y)
 Move along the x and y coordinate with a given x and y amount.
 
void moveX (double mx)
 Move along the x coordinate with a given x amount.
 
void moveY (double my)
 Move along the y coordinate with a given y amount.
 
double getX () const
 Get the current x coordinate.
 
double getY () const
 Get the current y coordinate.
 
Image getImage () const
 Get the Object's Image.
 
void setImage (Image i)
 Set the Object's Image with a given Image.
 
void setImage (string file, SDL_Renderer *ren)
 Give the path and renderer to create the Object's Image.
 
double getAngle () const
 Get the Object's angle.
 
void setAngle (double a)
 Set the angle.
 
void center (int w, int h)
 Center the Object based on a width and height.
 
SDL_Rect getFrame () const
 Get the frame that the Object parses from the Image.
 
SDL_Rect getDest () const
 Get the destination for the Object to be displayed on screen.
 
SDL_Rect getPos () const
 Get the position of the Object in the world.
 
void setFrame (SDL_Rect i)
 Set the frame with a given SDL_Rect.
 
void setDest (SDL_Rect i)
 Set the destination with a given SDL_Rect.
 
void setPos (SDL_Rect i)
 Set the position with a given SDL_Rect.
 
void setFrame (int x, int y, int w, int h)
 Set the frame with a given x and y coordinate and width and height.
 
void setFrameCoord (int x, int y)
 Set the x and y coordinate of the frame.
 
void setFrameSize (int w, int h)
 Set the size of the frame with a width and height.
 
void setFrameX (int x)
 Set the x coordinate of the frame.
 
void setVelTo (Object o)
 Set the object's velocity toward another object.
 
void lookAt (Object o)
 Set the object's angle towards another object.
 
void setFrameY (int y)
 Set the y coordinate of the frame.
 
void setFrameW (int w)
 
void setFrameH (int h)
 
int getFrameX () const
 
int getFrameY () const
 
int getFrameW () const
 
int getFrameH () const
 
void setDest (int x, int y, int w, int h)
 
void setDestCoord (int x, int y)
 
void setDestSize (int w, int h)
 
void setDestX (int x)
 
void setDestY (int y)
 
void setDestW (int w)
 
void setDestH (int h)
 
int getDestX () const
 
int getDestY () const
 
int getDestW () const
 
int getDestH () const
 
void setPos (int x, int y, int w, int h)
 
void setPosCoord (int x, int y)
 
void setPosSize (int w, int h)
 
void setPosX (int x)
 
void setPosY (int y)
 
void setPosW (int w)
 
void setPosH (int h)
 
int getPosX () const
 
int getPosY () const
 
int getPosW () const
 
int getPosH () const
 
void moveFrame (int x, int y)
 
void moveFrameX (int x)
 
void moveFrameY (int y)
 
void moveDest (int x, int y)
 
void moveDestX (int x)
 
void moveDestY (int y)
 
void movePos (int x, int y)
 
void movePosX (int x)
 
void movePosY (int y)
 
double getVelX ()
 
double getVelY ()
 
void setVelX (double vx)
 
void setVelY (double vy)
 
void setVelTo (int x, int y)
 
double getSpeed ()
 
void setSpeed (double s)
 
void setName (string s)
 
string getName ()
 
void centerOn (Input i)
 
void centerOn (int cx, int cy)
 
void centerOn (Object obj)
 
void lookAt (Input i)
 
void setColor (color c)
 
void setColor (Uint8 r, Uint8 g, Uint8 b)
 
void setTransparency (Uint8 a)
 
bool imageSet () const
 
color getColor () const
 
void rotateAngle (int rot)
 
void moveToVel ()
 

Public Attributes

color red = {0xff,0,0,0xff}
 
color green = {0,0xff,0,0xff}
 
color blue = {0,0,0xff,0xff}
 

Detailed Description

This class stores information for an Object in the game.

Definition at line 12 of file object.h.


The documentation for this class was generated from the following files: