diff options
author | Aki <please@ignore.pl> | 2023-02-11 17:26:49 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2023-02-11 17:26:49 +0100 |
commit | a5266d3e5da1d9ee9f873124674c68843a407ac0 (patch) | |
tree | 18a91419c4bdf37e7333a17bfb804e53fb92764a /sim/src/BaseBattle.cpp | |
parent | e66011756340e03fe941723f762119ed78ec2402 (diff) | |
download | kurator-a5266d3e5da1d9ee9f873124674c68843a407ac0.zip kurator-a5266d3e5da1d9ee9f873124674c68843a407ac0.tar.gz kurator-a5266d3e5da1d9ee9f873124674c68843a407ac0.tar.bz2 |
Context is now used in sim systems
Diffstat (limited to 'sim/src/BaseBattle.cpp')
-rw-r--r-- | sim/src/BaseBattle.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sim/src/BaseBattle.cpp b/sim/src/BaseBattle.cpp index 3e3815c..e34af76 100644 --- a/sim/src/BaseBattle.cpp +++ b/sim/src/BaseBattle.cpp @@ -5,6 +5,7 @@ #include <entt/entity/registry.hpp> #include <entt/signal/dispatcher.hpp> +#include <kurator/engine/Context.h> #include <kurator/campaign/Scenario.h> #include <kurator/sim/components.h> #include <kurator/sim/events.h> @@ -57,13 +58,13 @@ BaseBattle::dispatcher() void -BaseBattle::update(const float dt) +BaseBattle::update(engine::Context& ctx) { - time += dt; + time = ctx.clock.game; pick_random_targets(); keep_at_range(); - update<FloatingMovement>(dt); - update<TurretControl>(dt); + FloatingMovement::update(ctx); + TurretControl::update(ctx); kill_off_dead(); manager.clear(_registry); // registry supports on destructions events manager.update(_dispatcher); |