summaryrefslogtreecommitdiff
path: root/sim/include
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-12-31 14:27:11 +0100
committerAki <please@ignore.pl>2022-12-31 15:03:09 +0100
commitd90ab6b90f2507970c2da52b166d26a7c9b48d66 (patch)
tree42c23c2665dde54a893d8eccbfb0fe1df67f30d3 /sim/include
parent8cf68dfc5725e4a92a87390dcba2b9d7e5ef4e84 (diff)
downloadkurator-d90ab6b90f2507970c2da52b166d26a7c9b48d66.zip
kurator-d90ab6b90f2507970c2da52b166d26a7c9b48d66.tar.gz
kurator-d90ab6b90f2507970c2da52b166d26a7c9b48d66.tar.bz2
Extracted FloatingMovement component to own header and impl
Diffstat (limited to 'sim/include')
-rw-r--r--sim/include/kurator/sim/FloatingMovement.h27
-rw-r--r--sim/include/kurator/sim/components.h10
2 files changed, 27 insertions, 10 deletions
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 <entt/entity/registry.hpp>
+#include <entt/signal/dispatcher.hpp>
+
+#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;