-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.hpp
42 lines (33 loc) · 981 Bytes
/
game.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef GAME_HPP
#define GAME_HPP
#include "rythm.hpp"
#include "runner.hpp"
class Game
{
public:
Game();
~Game();
static void start();
static sf::RenderWindow& getWindow();
const static sf::Event& getCurrentEvent();
private:
static bool isExiting();
static void gameLoop();
static void updateAll();
static void drawAll();
static void drawScores();
static void easterEgg();
static void splashscreen();
enum GameState { Uninitialized, Paused, Splashscreen, Playing, Ending, Exiting };
static GameState _gameState;
static sf::RenderWindow _mainWindow;
static sf::Event _currentEvent;
static sf::Clock _clock;
static std::string _easterEgg;
static sf::Time _elapsedEaster;
static sf::Texture _texture;
static sf::Sprite _endImg;
static Rythm _rythm;
static Runner _runner;
};
#endif