diff options
Diffstat (limited to 'src/crepe/api/LoopManager.cpp')
-rw-r--r-- | src/crepe/api/LoopManager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crepe/api/LoopManager.cpp b/src/crepe/api/LoopManager.cpp index 90308a7..fec9f51 100644 --- a/src/crepe/api/LoopManager.cpp +++ b/src/crepe/api/LoopManager.cpp @@ -15,9 +15,6 @@ using namespace crepe; using namespace std; LoopManager::LoopManager() { - this->mediator.component_manager = this->component_manager; - this->mediator.scene_manager = this->scene_manager; - this->load_system<AnimatorSystem>(); this->load_system<CollisionSystem>(); this->load_system<ParticleSystem>(); @@ -37,6 +34,7 @@ void LoopManager::start() { void LoopManager::set_running(bool running) { this->game_running = running; } void LoopManager::fixed_update() { + // TODO: retrieve EventManager from direct member after singleton refactor EventManager & ev = this->mediator.event_manager; ev.dispatch_events(); this->get_system<ScriptSystem>().update(); @@ -71,11 +69,13 @@ void LoopManager::setup() { this->scene_manager.load_next_scene(); timer.start(); timer.set_fps(200); + this->scene_manager.load_next_scene(); } void LoopManager::render() { if (!this->game_running) return; + this->get_system<AnimatorSystem>().update(); this->get_system<RenderSystem>().update(); } |