Caseus Tower
 All Classes Namespaces Files Functions Variables
Entity Class Reference

Creates an Entity object Creates an Entity object with all the information about the Entity. More...

#include <entity.h>

Inheritance diagram for Entity:
Player

Public Member Functions

 Entity (float, float, int, int, int)
 
 ~Entity ()
 
void setX (float)
 
void setY (float)
 
void setXScale (int)
 
void setYScale (int)
 
void setYVelocity (float)
 
void setDisplay (bool)
 
void setAnimationIndex (int)
 
float getX ()
 
float getY ()
 
int getXScale ()
 
int getYScale ()
 
float getYVelocity ()
 
bool getDisplay ()
 
int getAnimationIndex ()
 
void updateY (float)
 

Protected Attributes

int xScale
 
int yScale
 
float x
 
float y
 
float yVelocity
 
bool display
 
int animationIndex
 

Detailed Description

Creates an Entity object Creates an Entity object with all the information about the Entity.

Definition at line 7 of file entity.h.

Constructor & Destructor Documentation

Entity::Entity ( float  ,
float  ,
int  ,
int  ,
int   
)

Constructs an Entity object

Parameters
floatinitial x position.
floatinitial y position.
intinitial x scale.
intinitial y scale.
intthe current animation index;
Entity::~Entity ( )

Destructs an Entity object

Member Function Documentation

int Entity::getAnimationIndex ( )

Getter # animation index

Returns
int the animation index of the Entity object.
bool Entity::getDisplay ( )

Getter # display

Returns
bool if the Entity object will display.
float Entity::getX ( )

Getter # x position

Returns
float the x position of the Entity object.
int Entity::getXScale ( )

Getter # x scale

Returns
int the x scale of the Entity object.
float Entity::getY ( )

Getter # y position

Returns
float the y position of the Entity object.
int Entity::getYScale ( )

Getter # y scale

Returns
int the y scale of the Entity object.
float Entity::getYVelocity ( )

Getter # y velocity

Returns
float the y velocity of the Entity object.
void Entity::setAnimationIndex ( int  )

Setter # animation index Sets the animation index of the Entity object to the inputed index.

Parameters
intthe inputed animation index
void Entity::setDisplay ( bool  )

Setter # display Sets the display boolean of the Entity object.

Parameters
boolthe inputed display bool
void Entity::setX ( float  )

Setter # x position Sets the x position of the Entity object to the inputed x position.

Parameters
floatthe inputed x position
void Entity::setXScale ( int  )

Setter # x scale Sets the x scale of the Entity object to the inputed x scale.

Parameters
intthe inputed x scale
void Entity::setY ( float  )

Setter # y position Sets the y position of the Entity object to the inputed y position.

Parameters
floatthe inputed y position
void Entity::setYScale ( int  )

Setter # y scale Sets the y scale of the Entity object to the inputed y scale.

Parameters
intthe inputed y scale
void Entity::setYVelocity ( float  )

Setter # y velocity Sets the y velocity of the Entity object to the inputed y velocity.

Parameters
floatthe inputed y velocity
void Entity::updateY ( float  )

Updates the Entity y position Updates the Entity y position using the velocity and the dt.

Parameters
floatthe dt

Member Data Documentation

int Entity::animationIndex
protected

Definition at line 21 of file entity.h.

bool Entity::display
protected

Definition at line 19 of file entity.h.

float Entity::x
protected

Definition at line 14 of file entity.h.

int Entity::xScale
protected

Definition at line 11 of file entity.h.

float Entity::y
protected

Definition at line 15 of file entity.h.

int Entity::yScale
protected

Definition at line 12 of file entity.h.

float Entity::yVelocity
protected

Definition at line 17 of file entity.h.


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