-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathWorld.h
executable file
·50 lines (42 loc) · 1.11 KB
/
World.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
#ifndef WORLD_H
#define WORLD_H
#include "ImmutableBag.h"
#include "TagManager.h"
#include "GroupManager.h"
namespace artemis {
class Entity;
class EntityManager;
class SystemManager;
/**
* The primary instance for the framework. It contains all the managers.
*
* You must use this to create, delete and retrieve entities.
*
* It is also important to set the delta each game loop iteration, and initialize before game loop.
*/
class World {
public:
World();
~World();
SystemManager * getSystemManager();
EntityManager * getEntityManager();
TagManager * getTagManager();
GroupManager * getGroupManager();
float getDelta();
void setDelta(float delta);
void deleteEntity(Entity& e);
void refreshEntity(Entity& e);
Entity& createEntity();
Entity& getEntity(int entityId);
void loopStart();
private:
SystemManager * systemManager;
EntityManager * entityManager;
TagManager * tagManager;
GroupManager * groupManager;
float delta;
Bag<Entity*> refreshed;
Bag<Entity*> deleted;
};
};
#endif // $(Guard token)