#include <state.h>
Inheritance diagram for State:
Public Member Functions | |
State (irr::c8 *name, irr::IrrlichtDevice *d) | |
~State () | |
Destructor. | |
bool | OnEvent (irr::SEvent event)=0 |
virtual void | entry (void)=0 |
virtual void | exit (void)=0 |
virtual void | render (irr::u32 deltaTime)=0 |
irr::core::stringc | getName (void) |
Protected Attributes | |
irr::IrrlichtDevice * | device |
Inheritanced classes can access this IrrlichtDevice*. | |
irr::core::stringc | name |
Inheritanced classes can access this string. |
Also it is an interface between StateMachine and your game state. Thus, you must rewrite all virtual functions. Function entry() will be called by StateMachine on state entry. This will be a kind of initialisation. Function render() will be called by StateMachine every frame and will be some kind of sub main-loop. Function exit() will be called by StateMachine on state exit. This will be a kind of deinitialisation.
Definition at line 16 of file state.h.
|
Constructor.
|
|
Overwrite this as implementation of State interface. Will be called by StateMachine as entry to this game state. Implemented in StateClose, StateFlockSimulation, StateMenu, StateTerrain, and StateTornado. Definition at line 27 of file state.cpp. References Debug::log(), and name. Referenced by StateMachine::startWith(). |
|
Overwrite this as implementation of State interface. Will be called by StateMachine as exit from this game state. Implemented in StateClose, StateFlockSimulation, StateMenu, StateTerrain, and StateTornado. Definition at line 32 of file state.cpp. References Debug::log(), and name. |
|
Definition at line 22 of file state.cpp. References name. Referenced by StateMachine::startWith(). |
|
Overwrite this as implementation of irr::IEventReceiver interface.
Implemented in StateClose, StateFlockSimulation, StateMenu, StateTerrain, and StateTornado. |
|
Overwrite this as implementation of State interface. Will be called by StateMachine every frame to update your graphics.
Implemented in StateClose, StateFlockSimulation, StateMenu, StateTerrain, and StateTornado. |