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/State.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sim/src/State.cpp (limited to 'sim/src/State.cpp') diff --git a/sim/src/State.cpp b/sim/src/State.cpp new file mode 100644 index 0000000..3c8a709 --- /dev/null +++ b/sim/src/State.cpp @@ -0,0 +1,25 @@ +#include + +#include + + +namespace kurator +{ +namespace sim +{ + + +State::operator engine::Context() +{ + return {registry, dispatcher, clock, camera}; +} + + +State::operator engine::ConstContext() const +{ + return {registry, dispatcher, clock, camera}; +} + + +} // namespace sim +} // namespace kurator -- cgit v1.1