![]() |
Number5
Visualisierung 2 Project - Florian Schober (0828151, f.schober@live.com), Andreas Walch (0926780, walch.andreas89@gmail.com)
|
#include <GameLogic.hpp>
Public Member Functions | |
uint | activeScene () const |
void | nextScene () |
vector< string > const & | scenes () const |
GameLogic (Application *app) | |
void | update (double time, double timeDelta) |
void | onKeyStateChanged (int key, bool pressed) |
Private Member Functions | |
void | initScene () |
void | initStaticPlane () |
void | initStaticCloud () |
void | initDynamicPlane () |
void | initDynamicCloud () |
Private Attributes | |
Application * | m_app |
vector< string > | m_scenes |
uint | m_activeScene |
GameLogic is used to create scenes and handle their switches.
Definition at line 8 of file GameLogic.hpp.
GameLogic | ( | Application * | app | ) |
Constructs a GameLogic-object.
app | The global application. |
Definition at line 4 of file GameLogic.cpp.
|
inline |
Accessor to the active scene.
Definition at line 27 of file GameLogic.hpp.
|
private |
Initializes a dynamic scene in the 3D-room
Definition at line 151 of file GameLogic.cpp.
|
private |
Initializes a dynamic scene on a plane
Definition at line 100 of file GameLogic.cpp.
|
private |
Initializes the currently active scene
Definition at line 30 of file GameLogic.cpp.
|
private |
Initializes a static scene in the 3D-room
Definition at line 192 of file GameLogic.cpp.
|
private |
Initializes a static scene on a plane
Definition at line 52 of file GameLogic.cpp.
|
inline |
Activates the next-scene (by round-robbing)
Definition at line 31 of file GameLogic.hpp.
void onKeyStateChanged | ( | int | key, |
bool | pressed | ||
) |
Callback for key-state-changes. Used to switch scenes by TAB-key.
key | The key |
pressed | Wheter it was pressed or released. |
Definition at line 230 of file GameLogic.cpp.
|
inline |
Accessor to the names of all scenes.
Definition at line 36 of file GameLogic.hpp.
void update | ( | double | time, |
double | timeDelta | ||
) |
Does nothing at all. Reserved for future use.
time | The absolute frame-time |
timeDelta | The time since the last frame |
Definition at line 27 of file GameLogic.cpp.
|
private |
Index of the currently active scene
Definition at line 13 of file GameLogic.hpp.
|
private |
The global application
Definition at line 10 of file GameLogic.hpp.
|
private |
All scene-names
Definition at line 12 of file GameLogic.hpp.