Peoplemon  0.1.0
Peoplemon 3 game source documentation
State.hpp
Go to the documentation of this file.
1 #ifndef GAME_STATES_STATE_HPP
2 #define GAME_STATES_STATE_HPP
3 
4 #include <BLIB/Engine/State.hpp>
6 
19 namespace game
20 {
22 namespace state
23 {
29 class State : public bl::engine::State {
30 public:
34  virtual ~State() = default;
35 
39  virtual const char* name() const override = 0;
40 
47  virtual void activate(bl::engine::Engine& engine) override = 0;
48 
54  virtual void deactivate(bl::engine::Engine& engine) override = 0;
55 
63  virtual void update(bl::engine::Engine& engine, float dt, float realDt) override = 0;
64 
65 protected:
67 
74  State(core::system::Systems& systems, bl::engine::StateMask::V mask);
75 };
76 
77 } // namespace state
78 } // namespace game
79 
80 #endif
Parent namespace for all functionality unique to the game.
Owns all primary systems and a reference to the engine.
Definition: Systems.hpp:47
Parent to all game states. Provides some commonly required data like core game systems.
Definition: State.hpp:29
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 deact...
State(core::system::Systems &systems, bl::engine::StateMask::V mask)
Initialize the state.
Definition: State.cpp:7
virtual void deactivate(bl::engine::Engine &engine) override=0
The state is now not the current state. Called after activate()
virtual ~State()=default
Destroy the State object.
virtual void update(bl::engine::Engine &engine, float dt, float realDt) override=0
Perform all update logic as required in here.
core::system::Systems & systems
Definition: State.hpp:66
virtual const char * name() const override=0
Return the name of the state.