diff options
Diffstat (limited to 'src/world.h')
-rw-r--r-- | src/world.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/world.h b/src/world.h new file mode 100644 index 0000000..ad6c788 --- /dev/null +++ b/src/world.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef WORLD_H | ||
2 | #define WORLD_H | ||
3 | |||
4 | class World; | ||
5 | |||
6 | #include <list> | ||
7 | #include "renderer.h" | ||
8 | #include "entity.h" | ||
9 | #include <cstdio> | ||
10 | |||
11 | class World { | ||
12 | public: | ||
13 | World() {}; | ||
14 | ~World() {}; | ||
15 | void tick(); | ||
16 | void input(int key, int action); | ||
17 | void render(Texture* buffer); | ||
18 | void addEntity(std::shared_ptr<Entity> e); | ||
19 | |||
20 | std::list<Collidable*> bodies; | ||
21 | std::shared_ptr<Entity> player; | ||
22 | |||
23 | private: | ||
24 | std::list<std::shared_ptr<Entity>> entities; | ||
25 | }; | ||
26 | |||
27 | #endif | ||