-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.h
35 lines (30 loc) · 782 Bytes
/
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
/**
* The Game class takes care of the lower level stuff such as setting up the window
*
* Author: Skylar Payne
* Date: 6/30/2013
* File: Game.h
**/
#pragma once
#include "SceneManager.h"
#include "IListener.h"
class Game : public IListener<ExitMessage>
{
private:
bool _Running;
int _ExitStatus;
SceneManager _SceneManager;
private:
void OnMessage(ExitMessage& msg);
public:
Game() : _Running(true), _ExitStatus(0) { }
~Game() { Quit(); }
bool Init(unsigned int width, unsigned int height, const char* title, IScene* startScene);
void Run();
void Quit();
/**
* @brief GetExitStatus gets the exit status of the game
* @return the exit status
*/
int GetExitStatus() const { return _ExitStatus; }
};