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 170 of file GameManager.cpp.

void GameManager::clear (  ) 

Clears the GameManager.

Definition at line 125 of file GameManager.cpp.

void GameManager::drop (  )  [virtual]

Decreases the reference counter.

Note:
This is a dummy function.

Reimplemented from ReferenceCounted.

Definition at line 164 of file GameManager.cpp.

AssetManager * GameManager::getAssetManager (  ) 

Returns a pointer to the AssetManager.

Definition at line 241 of file GameManager.cpp.

DataStore * GameManager::getDataStore (  ) 

Returns a pointer to the DataStore.

Definition at line 247 of file GameManager.cpp.

IrrlichtDevice * GameManager::getDevice (  ) 

Returns a pointer to the Irrlicht Device.

Note:
Not available in AngelScript.

Definition at line 217 of file GameManager.cpp.

IVideoDriver * GameManager::getDriver (  ) 

Returns a pointer to the Irrlicht driver.

Note:
Not available in AngelScript.

Definition at line 223 of file GameManager.cpp.

EntityManager * GameManager::getEntityManager (  ) 

Returns a pointer to the EntityManager.

Definition at line 253 of file GameManager.cpp.

EventManager * GameManager::getEventManager (  ) 

Returns a pointer to the EventManager.

Definition at line 259 of file GameManager.cpp.

IGUIEnvironment * GameManager::getGUIEnvironment (  ) 

Returns a pointer to the Irrlicht GUI Manager.

Note:
Not available in AngelScript.

Definition at line 235 of file GameManager.cpp.

bool GameManager::getIsRunning (  )  const

Returns whether the Irrlicht device is running.

Definition at line 285 of file GameManager.cpp.

ISceneManager * GameManager::getSceneManager (  ) 

Returns a pointer to the Irrlicht SceneManager.

Note:
Not available in AngelScript.

Definition at line 229 of file GameManager.cpp.

ScriptManager * GameManager::getScriptManager (  ) 

Returns a pointer to the ScriptManager.

Definition at line 267 of file GameManager.cpp.

SoundManager * GameManager::getSoundManager (  ) 

Returns a pointer to the Sound Manager.

Definition at line 277 of file GameManager.cpp.

void GameManager::grab (  )  [virtual]

Increases the reference counter.

Note:
This is a dummy function.

Reimplemented from ReferenceCounted.

Definition at line 158 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 201 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 185 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 292 of file GameManager.cpp.

void GameManager::update (  ) 

Updates the GameManager.

Definition at line 93 of file GameManager.cpp.


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

Generated on Sun Aug 30 14:17:13 2009 for Sirrf - Simple Irrlicht Framework by  doxygen 1.5.8