From d90ab6b90f2507970c2da52b166d26a7c9b48d66 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 31 Dec 2022 14:27:11 +0100 Subject: Extracted FloatingMovement component to own header and impl --- sim/include/kurator/sim/FloatingMovement.h | 27 +++++++++++++++++++++++++++ sim/include/kurator/sim/components.h | 10 ---------- 2 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 sim/include/kurator/sim/FloatingMovement.h (limited to 'sim/include') diff --git a/sim/include/kurator/sim/FloatingMovement.h b/sim/include/kurator/sim/FloatingMovement.h new file mode 100644 index 0000000..352377d --- /dev/null +++ b/sim/include/kurator/sim/FloatingMovement.h @@ -0,0 +1,27 @@ +#pragma once + +#include +#include + +#include "Point.h" + + +namespace kurator +{ +namespace sim +{ + + +struct FloatingMovement +{ + double max_speed; + double acceleration; + double deceleration; + double destination_boundary = 100.0; + Point speed = {0.0, 0.0}; + static void update(entt::registry& registry, entt::dispatcher& dispatcher, float dt); +}; + + +} // namespace sim +} // namespace kurator diff --git a/sim/include/kurator/sim/components.h b/sim/include/kurator/sim/components.h index 6fbab55..47ff5b2 100644 --- a/sim/include/kurator/sim/components.h +++ b/sim/include/kurator/sim/components.h @@ -33,16 +33,6 @@ struct AIState }; -struct FloatingMovement -{ - double max_speed; - double acceleration; - double deceleration; - double destination_boundary; - Point speed = {0.0, 0.0}; -}; - - struct HitPoints { double health; -- cgit v1.1