Handles the functions for all State objects.
More...
#include <S_StateManager.h>
Handles the functions for all State objects.
- Author
- Jamie Slowgrove
S_StateManager::S_StateManager |
( |
| ) |
|
Constructs the StateManager object.
S_StateManager::~S_StateManager |
( |
| ) |
|
Destructs the StateManager object.
void S_StateManager::addState |
( |
S_State * |
state | ) |
|
Adds a new state to the current stack of states.
- Parameters
-
state | A pointer to the State in use. |
void S_StateManager::changeState |
( |
S_State * |
state | ) |
|
Changes the current State to a new State.
- Parameters
-
state | A pointer to the State in use. |
void S_StateManager::draw |
( |
| ) |
|
Draws the current States.
bool S_StateManager::input |
( |
| ) |
|
Handles the user input for the current State on the top of the stack.
- Returns
- If false then quit the application.
void S_StateManager::removeLastState |
( |
| ) |
|
Removes the last State from the vector.
void S_StateManager::update |
( |
float |
dt | ) |
|
Updates the current State on the top of the stack.
- Parameters
-
dt | The delta time for use within the update function. |
std::vector<S_State*> S_StateManager::currentStates |
|
private |
The current states that are in use.
The documentation for this class was generated from the following files: