Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members

nge::core::GameManager Class Reference

Interface for GameManager. More...

#include <GameManager.hpp>

Inheritance diagram for nge::core::GameManager:

nge::core::NGEReceiver irr::IReferenceCounted irr::IEventReceiver

List of all members.

Public Member Functions

void CloseDevice ()
 Closes the device. Doesn't exit the application!!
ILevelManagercreateLevelManager (IGUIFont *font=0) const
void Exit (const wchar_t *text, ELOG_LEVEL ll=ELL_INFORMATION)
void Exit (const wchar_t *text, const wchar_t *hint, ELOG_LEVEL ll=ELL_INFORMATION)
void Exit (const c8 *text, const c8 *hint, ELOG_LEVEL ll=ELL_INFORMATION)
void Exit (const c8 *text, ELOG_LEVEL ll=ELL_INFORMATION)
 GameManager (SGameCreationParameters &GameParams)
 Constructor.
IAudioDevicegetAudioDevice () const
SColor & getBackBufferColor ()
IConfigManagergetConfigManager () const
 Returns the config manager.
GameStategetCurrentState () const
CursorControllergetCursorController () const
IrrlichtDevice * getDevice () const
 Returns the device.
NGEReceivergetEventReceiver () const
FontControllergetFontController () const
IGUIEnvironment * getGUIEnvironment () const
 Returns the GUI environment.
IGUIFont * getGUIFont (u32 index) const
 Returns the loaded font, if no font was loaded returns built-In font.
ISceneManager * getSceneManager () const
 Returns the scene manager.
const char * getVersion () const
IVideoDriver * getVideoDriver () const
 Returns the video driver.
virtual bool OnEvent (const SEvent &event)
 Main event handler derived from IEventReceiver.
void Update (SColor const &backBuffer=SColor(255, 0, 0, 0))
 Updates the screen.
virtual ~GameManager ()
 Destructor.

Private Member Functions

bool ChangeState (GameState *pState)
 Changes the game state.
bool CreateDevice (SGameCreationParameters &GameParams)
 Creates new device from config file.
bool Init (SGameCreationParameters &GameParams)
 Initialization. Should be called AFTER device creation!!

Private Attributes

SColor m_BackBuffer
IAudioDevicem_pAudioDevice
IConfigManagerm_pConfigManager
CursorControllerm_pCursorController
NGEReceiverm_pEventReceiver
FontControllerm_pFontController
GameStatem_pGameState
 Holds the current state.
IGUIEnvironment * m_pGUIEnvironment
IrrlichtDevice * m_pIrrDevice
ISceneManager * m_pSceneManager
IVideoDriver * m_pVideoDriver

Friends

class GameState


Detailed Description

Interface for GameManager.

This is the most important object as it holds the device and changes the state of the game!

Definition at line 37 of file GameManager.hpp.


Constructor & Destructor Documentation

nge::core::GameManager::GameManager ( SGameCreationParameters GameParams  ) 

Constructor.

virtual nge::core::GameManager::~GameManager (  )  [virtual]

Destructor.


Member Function Documentation

bool nge::core::GameManager::ChangeState ( GameState pState  )  [private]

Changes the game state.

Calls the current state's GameState::Clear() method before the next states GameState::Init() method

void nge::core::GameManager::CloseDevice (  ) 

Closes the device. Doesn't exit the application!!

It only closes the device so it could be created again on the same process, it doesn't close the application though. All irrlicht objects that needs to be dropped Should be dropped in here!

bool nge::core::GameManager::CreateDevice ( SGameCreationParameters GameParams  )  [private]

Creates new device from config file.

ILevelManager* nge::core::GameManager::createLevelManager ( IGUIFont *  font = 0  )  const

void nge::core::GameManager::Exit ( const wchar_t *  text,
ELOG_LEVEL  ll = ELL_INFORMATION 
)

void nge::core::GameManager::Exit ( const wchar_t *  text,
const wchar_t *  hint,
ELOG_LEVEL  ll = ELL_INFORMATION 
)

void nge::core::GameManager::Exit ( const c8 text,
const c8 hint,
ELOG_LEVEL  ll = ELL_INFORMATION 
)

void nge::core::GameManager::Exit ( const c8 text,
ELOG_LEVEL  ll = ELL_INFORMATION 
)

IAudioDevice* nge::core::GameManager::getAudioDevice (  )  const

SColor& nge::core::GameManager::getBackBufferColor (  ) 

IConfigManager* nge::core::GameManager::getConfigManager (  )  const

Returns the config manager.

GameState* nge::core::GameManager::getCurrentState (  )  const

CursorController* nge::core::GameManager::getCursorController (  )  const

IrrlichtDevice* nge::core::GameManager::getDevice (  )  const

Returns the device.

NGEReceiver* nge::core::GameManager::getEventReceiver (  )  const

FontController* nge::core::GameManager::getFontController (  )  const

IGUIEnvironment* nge::core::GameManager::getGUIEnvironment (  )  const

Returns the GUI environment.

IGUIFont* nge::core::GameManager::getGUIFont ( u32  index  )  const

Returns the loaded font, if no font was loaded returns built-In font.

ISceneManager* nge::core::GameManager::getSceneManager (  )  const

Returns the scene manager.

const char* nge::core::GameManager::getVersion (  )  const

IVideoDriver* nge::core::GameManager::getVideoDriver (  )  const

Returns the video driver.

bool nge::core::GameManager::Init ( SGameCreationParameters GameParams  )  [private]

Initialization. Should be called AFTER device creation!!

virtual bool nge::core::GameManager::OnEvent ( const SEvent event  )  [virtual]

Main event handler derived from IEventReceiver.

This will be passed down to the current states keyboard handler. Each state controls its own keyboard events.

Reimplemented from nge::core::NGEReceiver.

void nge::core::GameManager::Update ( SColor const &  backBuffer = SColor(255, 0, 0, 0)  ) 

Updates the screen.

Calls the current state's update method


Friends And Related Function Documentation

friend class GameState [friend]

Definition at line 119 of file GameManager.hpp.


Member Data Documentation

Definition at line 134 of file GameManager.hpp.

Definition at line 129 of file GameManager.hpp.

Definition at line 128 of file GameManager.hpp.

Definition at line 130 of file GameManager.hpp.

Definition at line 132 of file GameManager.hpp.

Definition at line 131 of file GameManager.hpp.

Holds the current state.

Definition at line 122 of file GameManager.hpp.

IGUIEnvironment* nge::core::GameManager::m_pGUIEnvironment [private]

Definition at line 127 of file GameManager.hpp.

IrrlichtDevice* nge::core::GameManager::m_pIrrDevice [private]

Definition at line 124 of file GameManager.hpp.

ISceneManager* nge::core::GameManager::m_pSceneManager [private]

Definition at line 126 of file GameManager.hpp.

IVideoDriver* nge::core::GameManager::m_pVideoDriver [private]

Definition at line 125 of file GameManager.hpp.


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

The NUSoftware Game Engine
The NUSoftware Game Engine Documentation © 2007-2008 by Tomer Nosrati. Generated on Sat Apr 26 16:52:35 2008 by Doxygen (1.5.5)