Jamie Slowgrove - MGP Assignment 2 - JAM
 All Classes Namespaces Files Functions Variables Macros
Public Member Functions | Private Attributes | List of all members
JAM_StateManager Class Reference

Creates a StateManager object. Creates a StateManager object to be inherited. More...

#include <StateManager.h>

Collaboration diagram for JAM_StateManager:
Collaboration graph

Public Member Functions

 JAM_StateManager ()
 
 ~JAM_StateManager ()
 
void addState (JAM_State *state)
 
void changeState (JAM_State *state)
 
void removeLastState ()
 
bool input ()
 
void update (float dt)
 
void draw ()
 

Private Attributes

std::vector< JAM_State * > currentStates
 

Detailed Description

Creates a StateManager object. Creates a StateManager object to be inherited.

Author
Jamie Slowgrove Reference ~ This is a modified version of my PGG Assignment 1 State Manager class.

Constructor & Destructor Documentation

JAM_StateManager::JAM_StateManager ( )

Constructs the StateManager object.

JAM_StateManager::~JAM_StateManager ( )

Destructs the StateManager object.

Member Function Documentation

void JAM_StateManager::addState ( JAM_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 JAM_StateManager::changeState ( JAM_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:

void JAM_StateManager::draw ( )

Draws the current State. The draw function that will allow the equivalent draw function to run in the current State.

Here is the caller graph for this function:

bool JAM_StateManager::input ( )

Handles the user input. The input function that will allow the equivalent input function to run in the current State.

Returns
If false then quit the application.

Here is the caller graph for this function:

void JAM_StateManager::removeLastState ( )

Removes the last State from the vector.

Here is the caller graph for this function:

void JAM_StateManager::update ( float  dt)

Updates the current State. The update function that will allow the equivalent update function to run in the current State.

Parameters
dtThe delta time for use within the update function.

Here is the caller graph for this function:

Member Data Documentation

std::vector<JAM_State*> JAM_StateManager::currentStates
private

The current states that are in use.


The documentation for this class was generated from the following files: