Creates a StateManager object.
More...
#include <StateManager.h>
Creates a StateManager object.
◆ StateManager()
StateManager::StateManager |
( |
| ) |
|
◆ ~StateManager()
StateManager::~StateManager |
( |
| ) |
|
◆ addState()
void StateManager::addState |
( |
State * |
state | ) |
|
Adds a new state to the current stack of states.
- Parameters
-
state | A pointer to the State in use. |
◆ changeState()
void StateManager::changeState |
( |
State * |
state | ) |
|
Changes the current State to a new State.
- Parameters
-
state | A pointer to the State in use. |
◆ destructPreviousState()
void StateManager::destructPreviousState |
( |
| ) |
|
A function to destruct the first state on the array.
◆ draw()
void StateManager::draw |
( |
| ) |
|
◆ input()
bool StateManager::input |
( |
| ) |
|
Handles the user input in the current State.
- Returns
- If false then quit the application.
◆ removeLastState()
void StateManager::removeLastState |
( |
| ) |
|
Removes the last State from the vector.
◆ update()
void StateManager::update |
( |
| ) |
|
Updates the current State.
◆ currentStates
std::vector<State*> StateManager::currentStates |
|
private |
The current states that are in use.
The documentation for this class was generated from the following files: