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.
37 lines
890 B
C++
37 lines
890 B
C++
#ifndef CLASSICGAME_H
|
|
#define CLASSICGAME_H
|
|
|
|
#include <map>
|
|
#include <list>
|
|
#include "game.h"
|
|
#include "classicactions.h"
|
|
#include "spritecontainer.h"
|
|
|
|
class ClassicTimeline;
|
|
|
|
class ClassicGame final : public Game
|
|
{
|
|
public:
|
|
explicit ClassicGame();
|
|
virtual ~ClassicGame() override;
|
|
|
|
virtual void run() override;
|
|
|
|
virtual void input(const sf::Event& event) override;
|
|
virtual void update() override;
|
|
virtual void draw(sf::RenderWindow &window) const override;
|
|
|
|
private:
|
|
std::map<sf::Keyboard::Key, Button> _keys_to_buttons;
|
|
std::map<Button, Action> _buttons_to_pressed_actions;
|
|
std::map<Button, Action> _buttons_to_released_actions;
|
|
|
|
Action getActionKeyPressed(Button button) const;
|
|
Action getActionKeyReleased(Button button) const;
|
|
|
|
std::unique_ptr<ClassicTimeline> _timeline;
|
|
SpriteContainer _sprite_container;
|
|
};
|
|
|
|
#endif // CLASSICGAME_H
|