48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <map>
|
|
#include <memory>
|
|
|
|
#include <SFML/Audio/SoundBuffer.hpp>
|
|
#include <SFML/Audio/Sound.hpp>
|
|
|
|
#include "core/game.h"
|
|
#include "core/timeline.h"
|
|
#include "tools/music.h"
|
|
|
|
#include "context.h"
|
|
#include "classicnote.h"
|
|
|
|
#include "classicmode/classicactions.h"
|
|
|
|
class ClassicGraphicsManager;
|
|
class HoldManager;
|
|
|
|
class ClassicGame final : public Game
|
|
{
|
|
public:
|
|
explicit ClassicGame(std::shared_ptr<ClassicGraphicsManager>&& manager);
|
|
virtual ~ClassicGame() override;
|
|
|
|
virtual void run() override;
|
|
|
|
virtual void input(PlayerInput &&inputdata) override;
|
|
virtual void update() override;
|
|
virtual void draw() const override;
|
|
|
|
private:
|
|
std::map<sf::Keyboard::Key, Type> _keys_to_buttons;
|
|
std::map<Type, Action> _buttons_to_pressed_actions;
|
|
std::map<Type, Action> _buttons_to_released_actions;
|
|
|
|
std::shared_ptr<ClassicGraphicsManager> _graphics_manager;
|
|
std::shared_ptr<HoldManager> _hold_manager;
|
|
Timeline<ClassicNote> _timeline;
|
|
|
|
sf::SoundBuffer _slap_buffer;
|
|
sf::Sound _slap;
|
|
|
|
Music _music;
|
|
Context _context;
|
|
};
|