Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
game::state::State Class Referenceabstract

Parent to all game states. Provides some commonly required data like core game systems. More...

#include <State.hpp>

+ Inheritance diagram for game::state::State:

Public Member Functions

virtual ~State ()=default
 Destroy the State object. More...
 
virtual const char * name () const override=0
 Return the name of the state. More...
 
virtual void activate (bl::engine::Engine &engine) override=0
 Make the state active. This is called before update() or render() and called exactly once until deactivate() is called. More...
 
virtual void deactivate (bl::engine::Engine &engine) override=0
 The state is now not the current state. Called after activate() More...
 
virtual void update (bl::engine::Engine &engine, float dt, float realDt) override=0
 Perform all update logic as required in here. More...
 

Protected Member Functions

 State (core::system::Systems &systems, bl::engine::StateMask::V mask)
 Initialize the state. More...
 

Protected Attributes

core::system::Systemssystems
 

Detailed Description

Parent to all game states. Provides some commonly required data like core game systems.

Definition at line 29 of file State.hpp.

Constructor & Destructor Documentation

◆ ~State()

virtual game::state::State::~State ( )
virtualdefault

Destroy the State object.

◆ State()

game::state::State::State ( core::system::Systems systems,
bl::engine::StateMask::V  mask 
)
protected

Initialize the state.

Parameters
systemsA reference to the core game systems
maskThe state mask

Definition at line 7 of file State.cpp.

Member Function Documentation

◆ activate()

virtual void game::state::State::activate ( bl::engine::Engine &  engine)
overridepure virtual

◆ deactivate()

virtual void game::state::State::deactivate ( bl::engine::Engine &  engine)
overridepure virtual

◆ name()

virtual const char* game::state::State::name ( ) const
overridepure virtual

◆ update()

virtual void game::state::State::update ( bl::engine::Engine &  engine,
float  dt,
float  realDt 
)
overridepure virtual

Member Data Documentation

◆ systems

core::system::Systems& game::state::State::systems
protected

Definition at line 66 of file State.hpp.


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