forked from NaiJi/project-kyoku
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
889 B
C++
38 lines
889 B
C++
#pragma once
|
|
|
|
#include "state.h"
|
|
#include "core/music.h"
|
|
#include "core/game.h"
|
|
#include "core/corefactory.h"
|
|
|
|
class Group;
|
|
|
|
class GameState : public GUIState
|
|
{
|
|
public:
|
|
|
|
struct Callbacks
|
|
{
|
|
std::function<void(void)> onLeaveGame;
|
|
};
|
|
|
|
|
|
explicit GameState(const std::shared_ptr<kku::CoreFactory>& core_factory, const std::shared_ptr<kku::Game>& game, Callbacks&& callbacks);
|
|
|
|
virtual void input(const kku::SystemEvent& event) override;
|
|
virtual void update(const kku::microsec& dt) override;
|
|
virtual void display() const override;
|
|
|
|
virtual void enter() override;
|
|
virtual void leave() override;
|
|
|
|
private:
|
|
const std::shared_ptr<kku::CoreFactory> _core_factory;
|
|
std::shared_ptr<kku::Music> _music;
|
|
std::shared_ptr<kku::Game> _game;
|
|
|
|
std::function<void(void)> _onEnterGameCallback;
|
|
std::function<void(void)> _onLeaveGameCallback;
|
|
};
|
|
|