project-kyoku/include/application.h

37 lines
655 B
C
Raw Normal View History

2021-04-03 13:14:31 -04:00
#ifndef APPLICATION_H
#define APPLICATION_H
2021-04-04 16:43:12 -04:00
#include <SFML/Audio/Music.hpp>
2021-04-03 13:14:31 -04:00
#include <SFML/System/Clock.hpp>
2021-04-05 10:17:57 -04:00
#include <SFML/Window/Keyboard.hpp>
2021-04-03 13:14:31 -04:00
2021-04-05 10:17:57 -04:00
#include "debughelper.h"
#include "timeline.h"
2021-04-08 12:08:01 -04:00
#include "note.h"
2021-04-04 16:43:12 -04:00
2021-04-03 13:14:31 -04:00
class Application
{
public:
Application();
void run();
2021-04-05 10:17:57 -04:00
void input();
2021-04-03 13:14:31 -04:00
void update();
void draw();
private:
2021-04-05 10:17:57 -04:00
sf::RenderWindow _game_window;
sf::Music _music;
sf::Font _font;
sf::Text _grade;
2021-04-17 12:14:36 -04:00
std::unique_ptr<Timeline> _timeline;
2021-04-05 10:17:57 -04:00
DebugHelper _debug;
void startGameLoop();
void onKeyPressed(const sf::Keyboard::Key& key);
2021-04-08 12:08:01 -04:00
void onTap(const Note::Arrow& arrow);
2021-04-03 13:14:31 -04:00
};
#endif // APPLICATION_H