Creates a State manager object. Creates a State manager object to be inherited. Made using information from http://blog.nuclex-games.com/tutorials/cxx/game-state-management/ and Peter Allen.
More...
#include <stateManager.h>
Creates a State manager object. Creates a State manager object to be inherited. Made using information from http://blog.nuclex-games.com/tutorials/cxx/game-state-management/ and Peter Allen.
StateManager::StateManager |
( |
| ) |
|
StateManager::~StateManager |
( |
| ) |
|
void StateManager::AddState |
( |
State * |
state | ) |
|
Adds a new state Adds a new state to the current stack of states
- Parameters
-
void StateManager::ChangeState |
( |
State * |
state | ) |
|
void StateManager::Draw |
( |
| ) |
|
Draws the current State The draw function that will allow the equivalent draw function to run in the current State
std::string StateManager::getName |
( |
| ) |
|
getter # the name of the current State gets the name of the current State
- Returns
- std::string the name of the state
bool StateManager::HandleSDLEvents |
( |
| ) |
|
Handles the SDL events The SDL event handler function that will allow the equivalent SDL event handler function to run in the current State
- Returns
- bool if false then quit the application
void StateManager::RemoveLastState |
( |
| ) |
|
Removes the last State from the vector Removes the last State from the vector
void StateManager::Update |
( |
float |
deltaTime | ) |
|
Updates the current State The update function that will allow the equivalent update function to run in the current State
- Parameters
-
float | the delta time for use within the update function |
The documentation for this class was generated from the following files: