diff options
author | Aki <please@ignore.pl> | 2023-02-13 22:52:18 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2023-02-13 22:52:42 +0100 |
commit | 2a9f378c66b28cef1c5ee063cf4d7e4e2889076e (patch) | |
tree | d678fce067c527052462adf91909f23664ca0544 /sim/src/BaseBattle.h | |
parent | 03bb1614c25a56ef6225db09c4c59b7a5f8fa808 (diff) | |
download | kurator-2a9f378c66b28cef1c5ee063cf4d7e4e2889076e.zip kurator-2a9f378c66b28cef1c5ee063cf4d7e4e2889076e.tar.gz kurator-2a9f378c66b28cef1c5ee063cf4d7e4e2889076e.tar.bz2 |
Created sim::State object to hold overall state of simulation
This is seems like it creats even more chaotic binding between the
components but it is a very nice and testable intermediate step
before moving everything to standalone systems and shoving state into
the... well, State.
Diffstat (limited to 'sim/src/BaseBattle.h')
-rw-r--r-- | sim/src/BaseBattle.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sim/src/BaseBattle.h b/sim/src/BaseBattle.h index 77e1d10..6f59457 100644 --- a/sim/src/BaseBattle.h +++ b/sim/src/BaseBattle.h @@ -1,11 +1,9 @@ #pragma once -#include <entt/entity/registry.hpp> -#include <entt/signal/dispatcher.hpp> - #include <kurator/engine/Context.h> #include <kurator/campaign/Scenario.h> #include <kurator/sim/Battle.h> +#include <kurator/sim/State.h> #include "TeamManager.h" @@ -20,12 +18,11 @@ class BaseBattle : public Battle { public: BaseBattle(const campaign::Scenario& scenario); - entt::registry& registry() override; - entt::dispatcher& dispatcher() override; + engine::Context context() override; + engine::ConstContext const_context() const override; void update(engine::Context& ctx) override; private: - entt::registry _registry; - entt::dispatcher _dispatcher; + State state; TeamManager manager; void pick_random_targets(); }; |