1 #ifndef GAME_STATES_MAINGAME_HPP
2 #define GAME_STATES_MAINGAME_HPP
24 ,
public bl::event::Listener<sf::Event, core::event::StateChange, core::event::SwitchMapTriggered,
25 core::event::BattleStarted, core::event::StoreOpened,
26 core::event::StorageSystemOpened> {
47 virtual const char*
name()
const override;
54 virtual void activate(bl::engine::Engine& engine)
override;
61 virtual void deactivate(bl::engine::Engine& engine)
override;
69 virtual void update(bl::engine::Engine& engine,
float dt,
float)
override;
72 enum GameState { SwitchMapFadeout, MapFadein, Running };
75 bl::rc::rgi::FadeEffectTask* fadeout;
77 std::string replacementMap;
82 virtual void observe(
const sf::Event& event)
override;
Parent namespace for all functionality unique to the game.
Fired when a battle should start. This does not actually start a battle, but communicates to the curr...
Fired when the map should be switched to something else.
Fired when the game should switch states. This event type is primarily for decoupling input code in C...
Fired when the storage system should be opened.
Event that is fired by the Core module to signal to the game to open a store.
Owns all primary systems and a reference to the engine.
The big honcho. This is the primary state that runs a majority of the time.
virtual const char * name() const override
Returns "MainGame".
virtual void deactivate(bl::engine::Engine &engine) override
Deactivates the game state.
virtual void activate(bl::engine::Engine &engine) override
Activates the state.
virtual ~MainGame()
Destroy the Main Game state.
virtual void update(bl::engine::Engine &engine, float dt, float) override
Updates all of the primary systems.
static bl::engine::State::Ptr create(core::system::Systems &systems)
Creates the main game state. The game state must be initialized before invoking the main game state.
Parent to all game states. Provides some commonly required data like core game systems.
core::system::Systems & systems