From 2a9f378c66b28cef1c5ee063cf4d7e4e2889076e Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 13 Feb 2023 22:52:18 +0100 Subject: 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. --- sim/src/BaseBattle.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'sim/src/BaseBattle.h') 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 -#include - #include #include #include +#include #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(); }; -- cgit v1.1