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

nge::game::Level Class Reference

This class represent a game level. All levels should inherit this class. More...

#include <Level.hpp>

Inheritance diagram for nge::game::Level:

irr::IReferenceCounted nge::game::NUSoftwareIntroLevel

List of all members.

Public Member Functions

virtual void clear ()
 Clearing the level from all its data.
virtual void drawLoadingPercentages (s32 Loading_Percent=0, const wchar_t *msg=L"Loading, Please wait...")
virtual ILevelManagergetLevelGraph () const
 Returns the level graph of the current level.
virtual f32 getLevelSpeed ()
 Returns the current speed of the level.
virtual void init ()
 Initiate the level, creating its level graph.
virtual bool isPaused ()
 Returns whether the level is paused or not.
 Level (GameManager *pMngr)
 Constructor.
virtual void load ()=0
 Load everything the level needs.
virtual void OnEvent (const NGEReceiver *event)
virtual void pauseLevel ()
 Pauses the level meaning no processing (like rendering) is done on the level.
virtual void resumeLevel ()
 Resume a previoused paused level, resuming all the processing process.
virtual void run ()
 Processing the level's data.
virtual void setLevelSpeed (f32 speed=1.f)
 Sets the rendering speed of the level.
virtual ~Level ()
 Destructor.

Protected Member Functions

virtual void OnPause ()
 Each paused game frame this method will be called.

Protected Attributes

array< E_DEBUG_LEVEL_TYPEm_aDebugData
bool m_IsPaused
f32 m_LastLevelSpeed
f32 m_LevelSpeed
ITexture * m_pLastShot
ILevelManagerm_pLevelGraph
GameManagerm_pManager


Detailed Description

This class represent a game level. All levels should inherit this class.

Because every level loads different objects the Level::load() method is pure virtual. Basically every level should implement the loading and the Level class will take care of the rest.

Definition at line 24 of file Level.hpp.


Constructor & Destructor Documentation

nge::game::Level::Level ( GameManager pMngr  ) 

Constructor.

virtual nge::game::Level::~Level (  )  [virtual]

Destructor.


Member Function Documentation

virtual void nge::game::Level::clear (  )  [virtual]

Clearing the level from all its data.

Reimplemented in nge::game::NUSoftwareIntroLevel.

virtual void nge::game::Level::drawLoadingPercentages ( s32  Loading_Percent = 0,
const wchar_t *  msg = L"Loading, Please wait..." 
) [virtual]

virtual ILevelManager* nge::game::Level::getLevelGraph (  )  const [virtual]

Returns the level graph of the current level.

virtual f32 nge::game::Level::getLevelSpeed (  )  [virtual]

Returns the current speed of the level.

virtual void nge::game::Level::init (  )  [virtual]

Initiate the level, creating its level graph.

Reimplemented in nge::game::NUSoftwareIntroLevel.

virtual bool nge::game::Level::isPaused (  )  [virtual]

Returns whether the level is paused or not.

virtual void nge::game::Level::load (  )  [pure virtual]

Load everything the level needs.

Implemented in nge::game::NUSoftwareIntroLevel.

virtual void nge::game::Level::OnEvent ( const NGEReceiver event  )  [virtual]

virtual void nge::game::Level::OnPause (  )  [protected, virtual]

Each paused game frame this method will be called.

This method draw the pause screen

virtual void nge::game::Level::pauseLevel (  )  [virtual]

Pauses the level meaning no processing (like rendering) is done on the level.

virtual void nge::game::Level::resumeLevel (  )  [virtual]

Resume a previoused paused level, resuming all the processing process.

virtual void nge::game::Level::run (  )  [virtual]

Processing the level's data.

All rendering of the level is done here

virtual void nge::game::Level::setLevelSpeed ( f32  speed = 1.f  )  [virtual]

Sets the rendering speed of the level.


Member Data Documentation

Definition at line 76 of file Level.hpp.

bool nge::game::Level::m_IsPaused [protected]

Definition at line 77 of file Level.hpp.

Definition at line 79 of file Level.hpp.

Definition at line 78 of file Level.hpp.

ITexture* nge::game::Level::m_pLastShot [protected]

Definition at line 75 of file Level.hpp.

Definition at line 74 of file Level.hpp.

Definition at line 73 of file Level.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:36 2008 by Doxygen (1.5.5)