summaryrefslogtreecommitdiff
path: root/sim/include
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-12-31 18:12:24 +0100
committerAki <please@ignore.pl>2022-12-31 18:12:24 +0100
commit087803532fd7dfa04bc9a39fd2886f572002d0b1 (patch)
tree808d6e8734065eddff69793d395deed0c86773f7 /sim/include
parent56ecf8834768fa61c299c07094c8760209f5bb45 (diff)
downloadkurator-087803532fd7dfa04bc9a39fd2886f572002d0b1.zip
kurator-087803532fd7dfa04bc9a39fd2886f572002d0b1.tar.gz
kurator-087803532fd7dfa04bc9a39fd2886f572002d0b1.tar.bz2
Extracted TurretControl to own unit
Diffstat (limited to 'sim/include')
-rw-r--r--sim/include/kurator/sim/TurretControl.h24
-rw-r--r--sim/include/kurator/sim/components.h9
2 files changed, 24 insertions, 9 deletions
diff --git a/sim/include/kurator/sim/TurretControl.h b/sim/include/kurator/sim/TurretControl.h
new file mode 100644
index 0000000..f6dc13a
--- /dev/null
+++ b/sim/include/kurator/sim/TurretControl.h
@@ -0,0 +1,24 @@
+#pragma once
+
+#include <entt/entity/entity.hpp>
+#include <entt/signal/dispatcher.hpp>
+
+
+namespace kurator
+{
+namespace sim
+{
+
+
+struct TurretControl
+{
+ double delay;
+ double reload;
+ int rounds;
+ entt::entity owner;
+ 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 7190369..34b0f93 100644
--- a/sim/include/kurator/sim/components.h
+++ b/sim/include/kurator/sim/components.h
@@ -39,14 +39,5 @@ struct HitPoints
};
-struct TurretControl
-{
- double delay;
- double reload;
- int rounds;
- entt::entity owner;
-};
-
-
} // namespace sim
} // namespace kurator