Public Member Functions | |
GameState () | |
Constructor. | |
virtual | ~GameState () |
Deconstructor. | |
virtual void | init () |
Initialises the GameState. | |
virtual void | clear () |
Clears the GameState. | |
virtual void | update (f32 deltaTime) |
Updates the GameState. | |
virtual void | render () |
Renders the GameState. | |
const Entity * | getBaseEntity () const |
Returns a pointer to the base pointer of the GameState. | |
void | onUpdate (f32 deltaTime) |
Sends the "onUpdate" event to all entities subscribed to this state. | |
void | onRender () |
Sends the "onUpdate" event to all entities subscribed to this state. | |
void | onPause () |
Sends the "onPause" event to all entities subscribed to this state. | |
void | onUnPause () |
Sends the "onUnPause" event to all entities subscribed to this state. | |
Protected Attributes | |
Entity * | mBaseEntity |
Friends | |
class | ScriptedGameState |
Definition at line 28 of file GameState.h.
GameState::GameState | ( | ) |
GameState::~GameState | ( | ) | [virtual] |
void GameState::clear | ( | ) | [virtual] |
Clears the GameState.
Reimplemented in InitState, and ScriptedGameState.
Definition at line 51 of file GameState.cpp.
const Entity * GameState::getBaseEntity | ( | ) | const |
Returns a pointer to the base pointer of the GameState.
Definition at line 68 of file GameState.cpp.
void GameState::init | ( | ) | [virtual] |
Initialises the GameState.
Reimplemented in InitState, and ScriptedGameState.
Definition at line 45 of file GameState.cpp.
void GameState::onPause | ( | ) |
Sends the "onPause" event to all entities subscribed to this state.
Definition at line 87 of file GameState.cpp.
void GameState::onRender | ( | ) |
Sends the "onUpdate" event to all entities subscribed to this state.
Definition at line 81 of file GameState.cpp.
void GameState::onUnPause | ( | ) |
Sends the "onUnPause" event to all entities subscribed to this state.
Definition at line 93 of file GameState.cpp.
void GameState::onUpdate | ( | f32 | deltaTime | ) |
Sends the "onUpdate" event to all entities subscribed to this state.
Definition at line 75 of file GameState.cpp.
void GameState::render | ( | ) | [virtual] |
Renders the GameState.
Reimplemented in InitState, and ScriptedGameState.
Definition at line 63 of file GameState.cpp.
void GameState::update | ( | f32 | deltaTime | ) | [virtual] |
Updates the GameState.
deltaTime | The time that has passed since the last update. |
Reimplemented in InitState, and ScriptedGameState.
Definition at line 57 of file GameState.cpp.
friend class ScriptedGameState [friend] |
Definition at line 30 of file GameState.h.
Entity* GameState::mBaseEntity [protected] |
Definition at line 72 of file GameState.h.