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...

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 refAdd ()
 Increases the reference counter.
void refRelease ()
 Decreases the reference counter.
void changeState (GameState *state)
 Close the current state and change to the given state.
void changeState (asIScriptObject *object)
 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 pushState (asIScriptObject *object)
 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.
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.
static GameManagerrefFactory ()
 Will be used to instanciate objects of this 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 40 of file GameManager.h.


Constructor & Destructor Documentation

GameManager::GameManager (  ) 

Constructor.

Definition at line 25 of file GameManager.cpp.

GameManager::~GameManager (  ) 

Deconstructor.

Definition at line 31 of file GameManager.cpp.


Member Function Documentation

void GameManager::changeState ( asIScriptObject *  object  ) 

Close the current state and change to the given state.

Note:
For internal use only!

Definition at line 166 of file GameManager.cpp.

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

void GameManager::clear (  ) 

Clears the GameManager.

Definition at line 111 of file GameManager.cpp.

DataStore * GameManager::getDataStore (  ) 

Returns a pointer to the DataStore.

Definition at line 252 of file GameManager.cpp.

IrrlichtDevice * GameManager::getDevice (  ) 

Returns a pointer to the Irrlicht Device.

Note:
Not available in AngelScript.

Definition at line 228 of file GameManager.cpp.

IVideoDriver * GameManager::getDriver (  ) 

Returns a pointer to the Irrlicht driver.

Note:
Not available in AngelScript.

Definition at line 234 of file GameManager.cpp.

EntityManager * GameManager::getEntityManager (  ) 

Returns a pointer to the EntityManager.

Definition at line 258 of file GameManager.cpp.

EventManager * GameManager::getEventManager (  ) 

Returns a pointer to the EventManager.

Definition at line 264 of file GameManager.cpp.

IGUIEnvironment * GameManager::getGUIEnvironment (  ) 

Returns a pointer to the Irrlicht GUI Manager.

Note:
Not available in AngelScript.

Definition at line 246 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 240 of file GameManager.cpp.

ScriptManager * GameManager::getScriptManager (  ) 

Returns a pointer to the ScriptManager.

Definition at line 270 of file GameManager.cpp.

SoundManager * GameManager::getSoundManager (  ) 

Returns a pointer to the Sound Manager.

Definition at line 276 of file GameManager.cpp.

void GameManager::init (  ) 

Initialises the GameManager.

Definition at line 56 of file GameManager.cpp.

GameManager * GameManager::Instance (  )  [static]

Returns a pointer to the singleton of the GameManager class.

Definition at line 39 of file GameManager.cpp.

void GameManager::popState (  ) 

Close the current state and resume the previous state.

Definition at line 212 of file GameManager.cpp.

void GameManager::pushState ( asIScriptObject *  object  ) 

Pause the current state and change to the given state.

Note:
For internal use only!

Definition at line 196 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 181 of file GameManager.cpp.

void GameManager::refAdd (  ) 

Increases the reference counter.

Note:
For internal use only!

Definition at line 140 of file GameManager.cpp.

GameManager & GameManager::Reference (  )  [static]

Returns a reference to the singleton of the GameManager class.

Definition at line 47 of file GameManager.cpp.

GameManager * GameManager::refFactory (  )  [static]

Will be used to instanciate objects of this class.

Note:
For internal use only!

Definition at line 134 of file GameManager.cpp.

void GameManager::refRelease (  ) 

Decreases the reference counter.

Note:
For internal use only!

Definition at line 146 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 79 of file GameManager.cpp.


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

Generated on Wed Jun 10 22:26:25 2009 for Sirrf - Simple Irrlicht Framework by  doxygen 1.5.8