-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEngine.h
More file actions
59 lines (36 loc) · 981 Bytes
/
Copy pathEngine.h
File metadata and controls
59 lines (36 loc) · 981 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
57
58
59
#ifndef ENGINE_H
#define ENGINE_H
#include <vector>
#include "EntityStream.h"
#include "Context.h"
#include "System.h"
class System;
class Engine
{
public:
enum KEY_PRESSED{
KEY_NONE,
KEY_SPACE,
KEY_MOUSE_UP,
KEY_MOUSE_DOWN
};
Engine(Context& context) {}
void AddEntity(Entity* entity);
void UpdateEntity(Entity* entity, std::vector<Component::Tag>& tags, bool remove);
std::vector<Entity*>::iterator RemoveEntity(Entity* entity);
void AddSystem(System* system);
std::vector<System*>::iterator RemoveSystem(System* system);
std::vector<Entity*>& GetEntities();
std::vector<System*>& GetSystems();
EntityStream& GetEntityStream();
Context& GetContext();
void Update();
Point mouseinput;
KEY_PRESSED keyInput = KEY_NONE;
private:
std::vector<Entity*> entities;
std::vector<System*> systems;
EntityStream entitystream_;
Context context_;
};
#endif