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. | |
void | refAdd () |
Increases the reference counter. | |
void | refRelease () |
Decreases the reference counter. | |
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. | |
Static Public Member Functions | |
static GameState * | refFactory () |
Will be used to instanciate objects of this class. | |
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 ScriptedGameState.
Definition at line 53 of file GameState.cpp.
const Entity * GameState::getBaseEntity | ( | ) | const |
Returns a pointer to the base pointer of the GameState.
Definition at line 90 of file GameState.cpp.
void GameState::init | ( | ) | [virtual] |
Initialises the GameState.
Reimplemented in ScriptedGameState.
Definition at line 47 of file GameState.cpp.
void GameState::onPause | ( | ) |
Sends the "onPause" event to all entities subscribed to this state.
Definition at line 109 of file GameState.cpp.
void GameState::onRender | ( | ) |
Sends the "onUpdate" event to all entities subscribed to this state.
Definition at line 103 of file GameState.cpp.
void GameState::onUnPause | ( | ) |
Sends the "onUnPause" event to all entities subscribed to this state.
Definition at line 115 of file GameState.cpp.
void GameState::onUpdate | ( | f32 | deltaTime | ) |
Sends the "onUpdate" event to all entities subscribed to this state.
Definition at line 97 of file GameState.cpp.
void GameState::refAdd | ( | ) |
Increases the reference counter.
Definition at line 77 of file GameState.cpp.
GameState * GameState::refFactory | ( | ) | [static] |
Will be used to instanciate objects of this class.
Definition at line 71 of file GameState.cpp.
void GameState::refRelease | ( | ) |
Decreases the reference counter.
Definition at line 83 of file GameState.cpp.
void GameState::render | ( | ) | [virtual] |
Renders the GameState.
Reimplemented in ScriptedGameState.
Definition at line 65 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 ScriptedGameState.
Definition at line 59 of file GameState.cpp.
friend class ScriptedGameState [friend] |
Definition at line 30 of file GameState.h.
Entity* GameState::mBaseEntity [protected] |
Definition at line 83 of file GameState.h.