Creates a Player object that inherits Entity.
More...
#include <Player.h>
Creates a Player object that inherits Entity.
- Author
- Jamie Slowgrove
Player::Player |
( |
Model * |
model, |
|
|
float |
scaleValue |
|
) |
| |
Constructs a Player Object. Creates a Player Object with a Model using the shader file locations, the obj file location and OpenGL.
- Parameters
-
model | A pointer to the model. |
scaleValue | The scale of the Model. |
float Player::getWorldSpeed |
( |
| ) |
|
Getter # Gets the world speed of the Entity.
- Returns
- The world speed of the Entity.
void Player::input |
( |
SDL_Event & |
incomingEvent | ) |
|
Handles inputs for the Player.
- Parameters
-
incomingEvent | A reference to the input event. |
void Player::resetCommands |
( |
| ) |
|
Sets all of the user commands to false
void Player::update |
( |
float |
dt | ) |
|
|
virtual |
A function that updates the Player
- Parameters
-
Implements Entity.
void Player::updateMovement |
( |
float |
dt | ) |
|
Updates the player movement.
- Parameters
-
void Player::updateRotation |
( |
float |
dt | ) |
|
Updates the player rotation.
- Parameters
-
void Player::updateRotationCheck |
( |
float |
dt, |
|
|
float |
direction |
|
) |
| |
Updates the player rotation.
- Parameters
-
dt | The delta time. |
direction | The direction to rotate the player (1 for up, -1 for down). |
The min angle the Player can be
The speed the world moves
The documentation for this class was generated from the following files: