Jamie Slowgrove - AI Assignment 1
Line of Sight & A* path-finding
 All Classes Namespaces Files Functions Variables
Public Member Functions | Private Attributes | List of all members
StateManager Class Reference

Creates a StateManager object. Creates a StateManager object to be inherited. DISCLAIMER - This code is from my PGG SDL Assignment. More...

#include <stateManager.h>

Collaboration diagram for StateManager:
Collaboration graph

Public Member Functions

 StateManager ()
 
 ~StateManager ()
 
void addState (State *)
 
void changeState (State *)
 
void removeLastState ()
 
bool input ()
 
void update (float deltaTime)
 
void draw ()
 

Private Attributes

std::vector< State * > currentStates
 

Detailed Description

Creates a StateManager object. Creates a StateManager object to be inherited. DISCLAIMER - This code is from my PGG SDL Assignment.

Constructor & Destructor Documentation

StateManager::StateManager ( )

Constructs a StateManager object

StateManager::~StateManager ( )

Destructs a StateManager object

Member Function Documentation

void StateManager::addState ( State state)

Adds a new state Adds a new state to the current stack of states

Parameters
State* a pointer to the State in use

Here is the caller graph for this function:

void StateManager::changeState ( State state)

Changes to a new State Changes the current State to a new State

Parameters
State* a pointer to the State in use

Here is the call graph for this function:

void 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 StateManager::input ( )

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

Returns
bool if false then quit the application

Here is the caller graph for this function:

void StateManager::removeLastState ( )

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
floatthe delta time for use within the update function

Here is the caller graph for this function:

Member Data Documentation

std::vector<State*> StateManager::currentStates
private

the current states that are in use


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