GameManager Class Reference

The Game Manager is the central access point to the game. It is able to perform generic game initialisation and deinitialisation. It's main purpose, though, is to control the flow of the game. More...

Inheritance diagram for GameManager:

Inheritance graph
[legend]
Collaboration diagram for GameManager:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 GameManager ()
 Constructor.
 ~GameManager ()
 Deconstructor.
void init ()
 Initialises the GameManager.
void update ()
 Updates the GameManager.
void clear ()
 Clears the GameManager.
void grab ()
 Increases the reference counter.
void drop ()
 Decreases the reference counter.
void changeState (GameState *state)
 Close the current state and change to the given state.
void pushState (GameState *state)
 Pause the current state and change to the given state.
void popState ()
 Close the current state and resume the previous state.
IrrlichtDevice * getDevice ()
 Returns a pointer to the Irrlicht Device.
IVideoDriver * getDriver ()
 Returns a pointer to the Irrlicht driver.
ISceneManager * getSceneManager ()
 Returns a pointer to the Irrlicht SceneManager.
IGUIEnvironment * getGUIEnvironment ()
 Returns a pointer to the Irrlicht GUI Manager.
AssetManagergetAssetManager ()
 Returns a pointer to the AssetManager.
DataStoregetDataStore ()
 Returns a pointer to the DataStore.
EntityManagergetEntityManager ()
 Returns a pointer to the EntityManager.
EventManagergetEventManager ()
 Returns a pointer to the EventManager.
ScriptManagergetScriptManager ()
 Returns a pointer to the ScriptManager.
SoundManagergetSoundManager ()
 Returns a pointer to the Sound Manager.
bool getIsRunning () const
 Returns whether the Irrlicht device is running.
void setIsRunning (bool value)
 Sets the running state of the Irrlicht device.

Static Public Member Functions

static GameManagerInstance ()
 Returns a pointer to the singleton of the GameManager class.
static GameManagerReference ()
 Returns a reference to the singleton of the GameManager class.


Detailed Description

The Game Manager is the central access point to the game. It is able to perform generic game initialisation and deinitialisation. It's main purpose, though, is to control the flow of the game.

Definition at line 49 of file GameManager.h.


Constructor & Destructor Documentation

GameManager::GameManager (  ) 

Constructor.

Definition at line 26 of file GameManager.cpp.

GameManager::~GameManager (  ) 

Deconstructor.

Definition at line 32 of file GameManager.cpp.


Member Function Documentation

void GameManager::changeState ( GameState state  ) 

Close the current state and change to the given state.

Parameters:
state Pointer to the new state.

Definition at line 167 of file GameManager.cpp.

void GameManager::clear (  ) 

Clears the GameManager.

Definition at line 123 of file GameManager.cpp.

void GameManager::drop (  )  [virtual]

Decreases the reference counter.

Note:
This is a dummy function.

Reimplemented from ReferenceCounted.

Definition at line 161 of file GameManager.cpp.

AssetManager * GameManager::getAssetManager (  ) 

Returns a pointer to the AssetManager.

Definition at line 238 of file GameManager.cpp.

DataStore * GameManager::getDataStore (  ) 

Returns a pointer to the DataStore.

Definition at line 244 of file GameManager.cpp.

IrrlichtDevice * GameManager::getDevice (  ) 

Returns a pointer to the Irrlicht Device.

Note:
Not available in AngelScript.

Definition at line 214 of file GameManager.cpp.

IVideoDriver * GameManager::getDriver (  ) 

Returns a pointer to the Irrlicht driver.

Note:
Not available in AngelScript.

Definition at line 220 of file GameManager.cpp.

EntityManager * GameManager::getEntityManager (  ) 

Returns a pointer to the EntityManager.

Definition at line 250 of file GameManager.cpp.

EventManager * GameManager::getEventManager (  ) 

Returns a pointer to the EventManager.

Definition at line 256 of file GameManager.cpp.

IGUIEnvironment * GameManager::getGUIEnvironment (  ) 

Returns a pointer to the Irrlicht GUI Manager.

Note:
Not available in AngelScript.

Definition at line 232 of file GameManager.cpp.

bool GameManager::getIsRunning (  )  const

Returns whether the Irrlicht device is running.

Definition at line 282 of file GameManager.cpp.

ISceneManager * GameManager::getSceneManager (  ) 

Returns a pointer to the Irrlicht SceneManager.

Note:
Not available in AngelScript.

Definition at line 226 of file GameManager.cpp.

ScriptManager * GameManager::getScriptManager (  ) 

Returns a pointer to the ScriptManager.

Definition at line 264 of file GameManager.cpp.

SoundManager * GameManager::getSoundManager (  ) 

Returns a pointer to the Sound Manager.

Definition at line 274 of file GameManager.cpp.

void GameManager::grab (  )  [virtual]

Increases the reference counter.

Note:
This is a dummy function.

Reimplemented from ReferenceCounted.

Definition at line 155 of file GameManager.cpp.

void GameManager::init (  ) 

Initialises the GameManager.

Definition at line 57 of file GameManager.cpp.

GameManager * GameManager::Instance (  )  [static]

Returns a pointer to the singleton of the GameManager class.

Definition at line 40 of file GameManager.cpp.

void GameManager::popState (  ) 

Close the current state and resume the previous state.

Definition at line 198 of file GameManager.cpp.

void GameManager::pushState ( GameState state  ) 

Pause the current state and change to the given state.

Parameters:
state Pointer to the new state.

Definition at line 182 of file GameManager.cpp.

GameManager & GameManager::Reference (  )  [static]

Returns a reference to the singleton of the GameManager class.

Definition at line 48 of file GameManager.cpp.

void GameManager::setIsRunning ( bool  value  ) 

Sets the running state of the Irrlicht device.

Definition at line 289 of file GameManager.cpp.

void GameManager::update (  ) 

Updates the GameManager.

Definition at line 91 of file GameManager.cpp.


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

Generated on Fri Aug 21 23:55:14 2009 for Sirrf - Simple Irrlicht Framework by  doxygen 1.5.8