-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame.h
More file actions
57 lines (38 loc) · 829 Bytes
/
Game.h
File metadata and controls
57 lines (38 loc) · 829 Bytes
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once
#include "MainMenuState.h"
#include "GameState.h"
class Game
{
private:
// Variables:
GraphicsSettings gfxSettings;
StateData stateData;
gui::FadeScreen fadeScreen;
sfx::SoundEngine soundEngine;
sf::RenderWindow* window;
sf::Event sfEvent;
sf::Clock dtClock;
float dt;
std::stack<State*> states;
std::map<const std::string, int32_t> supportedKeys;
float gridSize;
// private: Functions:
void initVariables();
void initGraphicsSettings(const std::string file_path);
void initWindow();
void initKeys(const std::string file_path);
void initStateData();
void initFadeScreen();
void initStates();
public:
// Constructors and Destructor:
Game();
~Game();
// Functions:
void run();
void endApplication();
void updateDt();
void updateSfEvents();
void update();
void render();
};