Caseus Tower
 All Classes Namespaces Files Functions Variables
Player Class Reference

Creates an Player object that inherits Entity Creates an Player object that inherits Entity with a x velocity. More...

#include <player.h>

Inheritance diagram for Player:
Entity

Public Member Functions

 Player (float, float, int, int, int)
 
 ~Player ()
 
void setXVelocity (float)
 
float getXVelocity ()
 
void updateX (float)
 
- Public Member Functions inherited from Entity
 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)
 

Private Attributes

float xVelocity
 

Additional Inherited Members

- Protected Attributes inherited from Entity
int xScale
 
int yScale
 
float x
 
float y
 
float yVelocity
 
bool display
 
int animationIndex
 

Detailed Description

Creates an Player object that inherits Entity Creates an Player object that inherits Entity with a x velocity.

Definition at line 9 of file player.h.

Constructor & Destructor Documentation

Player::Player ( float  ,
float  ,
int  ,
int  ,
int   
)

Constructs the Player object

Parameters
floatthe initial x position
floatthe initial y position
intthe Player sprite's x scale
intthe Player sprite's y scale
intthe Player current animation index;
Player::~Player ( )

Destructs an Player object

Member Function Documentation

float Player::getXVelocity ( )

Getter # x velocity

Returns
the x velocity of the Player object.
void Player::setXVelocity ( float  )

Setter # x velocity Sets the x velocity of the Player object to the inputed velocity.

Parameters
floatthe inputed x velocity
void Player::updateX ( float  )

Updates the Player x position Updates the Player x position using the velocity and the dt.

Parameters
floatthe dt

Member Data Documentation

float Player::xVelocity
private

Definition at line 13 of file player.h.


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