aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorAndy <drumsetmonkey@gmail.com>2016-10-19 10:46:12 -0400
committerAndy <drumsetmonkey@gmail.com>2016-10-19 10:46:12 -0400
commitaff1681f6638f591e2c8281f63847550115a2a19 (patch)
tree38129164ccbe54f271a399e799a8492aa3049c38 /src/engine.cpp
parent0964a086ccfe2ba18b8e40d0199bdaf80841f344 (diff)
CATATATATATATATTTTT (basic entities)
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 56dee48..3705d4f 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -6,6 +6,7 @@
#include <inventory.hpp>
#include <entities.hpp>
#include <window.hpp>
+#include <components.hpp>
extern World *currentWorld;
@@ -19,9 +20,11 @@ void Engine::init(void) {
game::events.subscribe<GameEndEvent>(*this);
systems.add<WindowSystem>();
- systems.add<InputSystem>();
+ systems.add<RenderSystem>();
+ systems.add<InputSystem>();
systems.add<InventorySystem>();
systems.add<WorldSystem>();
+ systems.add<MovementSystem>();
systems.add<PlayerSystem>(&player);
systems.configure();
@@ -31,7 +34,9 @@ void Engine::init(void) {
void Engine::render(entityx::TimeDelta dt)
{
- systems.update<WindowSystem>(dt);
+ systems.update<RenderSystem>(dt);
+ systems.update<WindowSystem>(dt);
+
}
void Engine::update(entityx::TimeDelta dt)
@@ -39,6 +44,7 @@ void Engine::update(entityx::TimeDelta dt)
systems.update<InputSystem>(dt);
systems.update<InventorySystem>(dt);
systems.update<PlayerSystem>(dt);
+ systems.update<MovementSystem>(dt);
systems.update<WorldSystem>(dt);
}
@@ -46,6 +52,7 @@ void Engine::update(entityx::TimeDelta dt)
namespace game {
entityx::EventManager events;
entityx::EntityManager entities (events);
+ SpriteLoader sprite_l;
Engine engine;
}