-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame.hpp
More file actions
37 lines (30 loc) · 759 Bytes
/
Game.hpp
File metadata and controls
37 lines (30 loc) · 759 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
#pragma once
#include <memory>
#include <string>
#include <SFML/Graphics.hpp>
#include "StateMachine.hpp"
#include "AssetManager.hpp"
#include "InputManager.hpp"
namespace ArktisProductions
{
struct GameData
{
StateMachine machine;
sf::RenderWindow window;
sf::Clock gameClock;
AssetManager assets;
InputManager input;
};
typedef std::shared_ptr<GameData> GameDataRef;
class Game
{
public:
Game(int width, int height, std::string title);
private:
// Updates run at 60 per second.
const float dt = 1.0f / 60.0f;
sf::Clock _clock;
GameDataRef _data = std::make_shared<GameData>();
void Run();
};
}