summary refs log tree commit diff stats
path: root/src/world.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/world.cpp b/src/world.cpp deleted file mode 100644 index 90d9ab8..0000000 --- a/src/world.cpp +++ /dev/null
@@ -1,32 +0,0 @@
1#include "world.h"
2
3void World::tick()
4{
5 for (auto it = entities.begin(); it != entities.end(); it++)
6 {
7 (*it)->tick();
8 }
9}
10
11void World::input(int key, int action)
12{
13 for (auto it = entities.begin(); it != entities.end(); it++)
14 {
15 (*it)->input(key, action);
16 }
17}
18
19void World::render(Texture* buffer)
20{
21 fillTexture(buffer, NULL, 0, 0, 0);
22
23 for (auto it = entities.begin(); it != entities.end(); it++)
24 {
25 (*it)->render(buffer);
26 }
27}
28
29void World::addEntity(std::shared_ptr<Entity> e)
30{
31 entities.push_back(e);
32}