1 #ifndef GAME_STATES_STATE_HPP
2 #define GAME_STATES_STATE_HPP
4 #include <BLIB/Engine/State.hpp>
29 class State :
public bl::engine::State {
39 virtual const char*
name()
const override = 0;
47 virtual void activate(bl::engine::Engine& engine)
override = 0;
54 virtual void deactivate(bl::engine::Engine& engine)
override = 0;
63 virtual void update(bl::engine::Engine& engine,
float dt,
float realDt)
override = 0;
Parent namespace for all functionality unique to the game.
Owns all primary systems and a reference to the engine.
Parent to all game states. Provides some commonly required data like core game systems.
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.
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
virtual const char * name() const override=0
Return the name of the state.