Creates a Player object that inherits Creature which in turn inherits Entity.
More...
#include <player.h>
|
| | Player (Texture *, float, float, int, int) |
| |
| | ~Player () |
| |
| void | setLives (int) |
| |
| int | getLives () |
| |
| void | setScore (int) |
| |
| int | getScore () |
| |
| void | setGravity (bool) |
| |
| bool | getGravity () |
| |
| void | setLanded (bool) |
| |
| bool | getLanded () |
| |
| void | setJump (bool) |
| |
| bool | getJump () |
| |
| float | getGravityF () |
| |
| void | setLevelComplete (bool) |
| |
| bool | getLevelComplete () |
| |
| | Creature (Texture *, float, float) |
| |
| | ~Creature () |
| |
| void | setVelocityX (float) |
| |
| void | setVelocityY (float) |
| |
| void | updateX (float) |
| |
| void | updateY (float) |
| |
| float | getVelocityX () |
| |
| float | getVelocityY () |
| |
| | Entity (Texture *, float, float, int, int) |
| |
| | ~Entity () |
| |
| void | display (SDL_Renderer *) |
| |
| void | setX (float) |
| |
| void | setY (float) |
| |
| float | getX () |
| |
| float | getY () |
| |
| void | setSrcX (float) |
| |
| void | setSrcY (float) |
| |
| int | getSrcX () |
| |
| int | getSrcY () |
| |
|
|
float | velocityX |
| |
|
float | velocityY |
| |
|
Texture * | texture |
| |
|
int | srcWidth |
| |
|
int | srcHeight |
| |
|
int | srcX |
| |
|
int | srcY |
| |
|
int | width |
| |
|
int | height |
| |
|
float | x |
| |
|
float | y |
| |
Creates a Player object that inherits Creature which in turn inherits Entity.
| Player::Player |
( |
Texture * |
inputTexture, |
|
|
float |
inputX, |
|
|
float |
inputY, |
|
|
int |
spriteSheetNumberX, |
|
|
int |
spriteSheetNumberY |
|
) |
| |
Constructs a Player object Constructs the Player object.
- Parameters
-
| Texture* | a pointer to a Texture loaded into memory. |
| float | initial x position. |
| float | initial y position. |
| int | the sprite sheet x number. |
| int | the sprite sheet y number. |
De-constructs a Player object De-constructs the Player object
| bool Player::getGravity |
( |
| ) |
|
Getter # gravity
- Returns
- bool if gravity is acting.
| float Player::getGravityF |
( |
| ) |
|
Getter # gravityF
- Returns
- float the value of the force gravity.
Getter # jump
- Returns
- bool if the Player is jumping.
| bool Player::getLanded |
( |
| ) |
|
Getter # landed
- Returns
- bool if the Player has landed.
| bool Player::getLevelComplete |
( |
| ) |
|
Getter # level complete
- Returns
- bool if the Player has finished the level.
Getter # lives
- Returns
- int the number of lives the Player has.
Getter # score
- Returns
- int the score the Player has.
| void Player::setGravity |
( |
bool |
inputGravity | ) |
|
Setter # gravity Sets if gravity is acting on not.
- Parameters
-
| bool | if gravity is acting. |
| void Player::setJump |
( |
bool |
inputJump | ) |
|
Setter # jump Sets if the Player is jumping.
- Parameters
-
| void Player::setLanded |
( |
bool |
inputLanding | ) |
|
Setter # landed Sets if the Player has landed.
- Parameters
-
| void Player::setLevelComplete |
( |
bool |
inputLevelComplete | ) |
|
Setter # level complete Sets if the Player has finished the level.
- Parameters
-
| bool | if the Player has finished the level. |
| void Player::setLives |
( |
int |
inputLives | ) |
|
Setter # lives Sets the number of lives of the Player object to the inputed number.
- Parameters
-
| int | the inputed number of lives |
| void Player::setScore |
( |
int |
inputScore | ) |
|
Setter # score Sets the score of the Player object to the inputed number.
- Parameters
-
The documentation for this class was generated from the following files:
- PGGAssignment1SDL/player.h
- PGGAssignment1SDL/player.cpp