-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame.h
More file actions
53 lines (41 loc) · 871 Bytes
/
Copy pathGame.h
File metadata and controls
53 lines (41 loc) · 871 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
#ifndef GAME_H
#define GAME_H
#include "Engine.h"
#include "Allkit.h"
#include "Context.h"
#include "RenderSystem.h"
#include "LauncherSystem.h"
#include "MissileSystem.h"
#include "TargetSystem.h"
#include "LevelSystem.h"
#include <fstream>
#include <iostream>
#include <sstream>
class Game
{
public:
Game(Context& context) : context_(context), engine_(context) {
ak_ = &Allkit::Get();
};
~Game()
{
for(Entity* entity:engine_.GetEntities()){
delete entity;
};
for(System* system:engine_.GetSystems()){
delete system;
};
};
bool Run();
void EndGame();
bool ReadHighscoreFile();
void SetupSystems();
void LoadLevel();
void InitMissileQueue();
private:
Allkit* ak_ = NULL;
Context& context_;
Engine engine_;
bool exit_ = false;
};
#endif