-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.h
50 lines (35 loc) · 1.01 KB
/
Game.h
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
/**
* Main class that regulates the application's flow.
*
* @author Francis BISSON
*/
#ifndef GAME_H
#define GAME_H
// INCLUDES ////////////////////////////////////////////////////////////////////
#include "DisplayContext.h"
#include "FramerateModule.h"
#include "KeyboardDevice.h"
#include "Scene.h"
#include "Rectangle.h"
// CLASS DEFINITION ////////////////////////////////////////////////////////////
class Game
{
public:
Game();
virtual ~Game();
virtual bool Init();
virtual void Start();
virtual void ChangeScene(ScenePtr scene);
void Quit() { m_Quit = true; }
const KeyboardDevice& GetKeyboardDevice() const { return m_KeyboardDevice; }
virtual Rectangle GetDisplayArea() const { return m_DisplayArea; }
protected:
virtual void ManageEvents();
DisplayContext m_DisplayContext;
KeyboardDevice m_KeyboardDevice;
ScenePtr m_CurrentScene;
bool m_Quit;
FramerateModule m_Framerate;
Rectangle m_DisplayArea;
};
#endif // GAME_H