Sky Zone Omega - PC Version
 All Classes Namespaces Files Functions Variables Macros
Public Member Functions | Private Attributes | List of all members
S_StateManager Class Reference

Handles the functions for all State objects. More...

#include <S_StateManager.h>

Collaboration diagram for S_StateManager:
Collaboration graph

Public Member Functions

 S_StateManager ()
 Constructs the StateManager object. More...
 
 ~S_StateManager ()
 Destructs the StateManager object. More...
 
void addState (S_State *state)
 Adds a new state to the current stack of states. More...
 
void changeState (S_State *state)
 Changes the current State to a new State. More...
 
void removeLastState ()
 Removes the last State from the vector. More...
 
bool input ()
 Handles the user input for the current State on the top of the stack. More...
 
void update (float dt)
 Updates the current State on the top of the stack. More...
 
void draw ()
 Draws the current States. More...
 

Private Attributes

std::vector< S_State * > currentStates
 The current states that are in use. More...
 

Detailed Description

Handles the functions for all State objects.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

S_StateManager::S_StateManager ( )

Constructs the StateManager object.

S_StateManager::~S_StateManager ( )

Destructs the StateManager object.

Member Function Documentation

void S_StateManager::addState ( S_State state)

Adds a new state to the current stack of states.

Parameters
stateA pointer to the State in use.

Here is the caller graph for this function:

void S_StateManager::changeState ( S_State state)

Changes the current State to a new State.

Parameters
stateA pointer to the State in use.

Here is the call graph for this function:

Here is the caller graph for this function:

void S_StateManager::draw ( )

Draws the current States.

Here is the caller graph for this function:

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.

Here is the caller graph for this function:

void S_StateManager::removeLastState ( )

Removes the last State from the vector.

Here is the caller graph for this function:

void S_StateManager::update ( float  dt)

Updates the current State on the top of the stack.

Parameters
dtThe delta time for use within the update function.

Here is the caller graph for this function:

Member Data Documentation

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: