aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/manager/SystemManager.cpp
diff options
context:
space:
mode:
authormax-001 <maxsmits21@kpnmail.nl>2024-12-20 12:24:59 +0100
committermax-001 <maxsmits21@kpnmail.nl>2024-12-20 12:24:59 +0100
commitb291d662f79af8de95ab40de29a09f87470d0095 (patch)
tree0fc3318f985f888ca8dd70ac2005cb925dc6f58b /src/crepe/manager/SystemManager.cpp
parent2b64252d44aea2709f836eaed199bcc04e961179 (diff)
pull 3bda25f from demo
Diffstat (limited to 'src/crepe/manager/SystemManager.cpp')
-rw-r--r--src/crepe/manager/SystemManager.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/crepe/manager/SystemManager.cpp b/src/crepe/manager/SystemManager.cpp
index 5ada30f..f029aa5 100644
--- a/src/crepe/manager/SystemManager.cpp
+++ b/src/crepe/manager/SystemManager.cpp
@@ -19,12 +19,12 @@ SystemManager::SystemManager(Mediator & mediator) : Manager(mediator) {
this->load_system<InputSystem>();
this->load_system<EventSystem>();
this->load_system<ScriptSystem>();
+ this->load_system<ParticleSystem>();
this->load_system<AISystem>();
this->load_system<PhysicsSystem>();
this->load_system<CollisionSystem>();
this->load_system<AudioSystem>();
this->load_system<AnimatorSystem>();
- this->load_system<ParticleSystem>();
this->load_system<RenderSystem>();
this->load_system<ReplaySystem>();
@@ -32,16 +32,16 @@ SystemManager::SystemManager(Mediator & mediator) : Manager(mediator) {
}
void SystemManager::fixed_update() {
- for (auto & [type, system] : this->systems) {
- if (!system->active) continue;
- system->fixed_update();
+ for (System & system : this->system_order) {
+ if (!system.active) continue;
+ system.fixed_update();
}
}
void SystemManager::frame_update() {
- for (auto & [type, system] : this->systems) {
- if (!system->active) continue;
- system->frame_update();
+ for (System & system : this->system_order) {
+ if (!system.active) continue;
+ system.frame_update();
}
}
@@ -64,3 +64,4 @@ void SystemManager::disable_all() {
system->active = false;
}
}
+