Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
GamePlay Class Reference

#include <gameplay.h>

Inheritance diagram for GamePlay:
[legend]
Collaboration diagram for GamePlay:
[legend]

Public Member Functions

 GamePlay (Game *game)
 
Gamegame ()
 
GamePlayScenescene ()
 
GamePlayRunningrunning ()
 
GamePlayPausedpaused ()
 
virtual const Scenescene () const override
 
virtual const CameraHeadcameraHead () const override
 
SoundManagersoundManager ()
 
void loadScenario (int i)
 
virtual void update (float deltaSec) override
 
virtual void onEntered () override
 
virtual void onLeft () override
 
- Public Member Functions inherited from GameState
 GameState (const std::string &name, GameState *parent)
 
GameStateparentGameState ()
 
- Public Member Functions inherited from State
 State (State *parent=nullptr)
 
 State (const std::string &name, State *parent=nullptr)
 
const std::string & name () const
 
void setName (const std::string &name)
 
StateparentState ()
 
const StateparentState () const
 
StateinitialSubState ()
 
const StateinitialSubState () const
 
void setInitialSubState (State *initialSubState)
 
StatefinalSubState ()
 
const StatefinalSubState () const
 
void setFinalSubState (State *finalSubState)
 
StatecurrentSubState ()
 
const StatecurrentSubState () const
 
void setCurrentSubState (State *substate)
 
bool finished () const
 
std::list< State * > & substates ()
 
const std::list< State * > & substates () const
 
void addSubState (State *state)
 
void removeSubState (State *state)
 
std::list< Transition * > & transitions ()
 
const std::list< Transition * > & transitions () const
 
void addTransition (Transition *transition)
 
void removeTransition (Transition *transition)
 

Protected Attributes

Gamem_game
 
std::unique_ptr< GamePlayScenem_scene
 
std::unique_ptr< BaseScenariom_scenario
 
std::shared_ptr< SoundManagerm_soundManager
 
GamePlayRunningm_runningState
 
GamePlayPausedm_pausedState
 
- Protected Attributes inherited from GameState
GameStatem_parentGameState
 
- Protected Attributes inherited from State
std::string m_name
 
Statem_parentState
 
std::list< State * > m_subStates
 
std::list< Transition * > m_transitions
 
Statem_initialSubState
 
Statem_finalSubState
 
Statem_currentSubState
 

Additional Inherited Members

- Protected Member Functions inherited from State
StatepathToDescendant (State *descendant)
 
void transit (State *target)
 
void leave ()
 

Detailed Description

State that is active whenever the the game is actually played and not in some menustate etc.

Member Function Documentation

void GamePlay::onEntered ( )
overridevirtual

Overrideable method that is called whenever a state or any of its substates come to be currentSubState This happens recursively up to the root-state

Reimplemented from GameState.

void GamePlay::onLeft ( )
overridevirtual

Overrideable method that is called whenever a state ceases to be currentSubState This happens recursively up to the root-state

Reimplemented from GameState.

void GamePlay::update ( float  deltaSec)
overridevirtual

Performs a Transition from the currentSubState, if such isPossible()

Reimplemented from GameState.


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