summaryrefslogtreecommitdiff
path: root/sim/include
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2023-05-04 00:07:51 +0200
committerAki <please@ignore.pl>2024-04-05 19:41:19 +0200
commit52b0bdaba5b38790d144bf1e800ea34be937ded0 (patch)
treec2215cb7848e421b9c96fcc5cf4beb83b3a75c97 /sim/include
parent61d16477b01bcfbe8c3a481a232658ac60309f57 (diff)
downloadkurator-52b0bdaba5b38790d144bf1e800ea34be937ded0.zip
kurator-52b0bdaba5b38790d144bf1e800ea34be937ded0.tar.gz
kurator-52b0bdaba5b38790d144bf1e800ea34be937ded0.tar.bz2
Refactored Actions to be owned by registry
Registry is now also responsible for switching between the actions and each action is expected to have one system. Technically an std::variant could be used here, but let's wait a bit and see how this part evolves.
Diffstat (limited to 'sim/include')
-rw-r--r--sim/include/kurator/sim/ai.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/sim/include/kurator/sim/ai.h b/sim/include/kurator/sim/ai.h
index 0ffa1cc..4953d4f 100644
--- a/sim/include/kurator/sim/ai.h
+++ b/sim/include/kurator/sim/ai.h
@@ -1,7 +1,5 @@
#pragma once
-#include <functional>
-
#include <entt/entt.hpp>
#include <kurator/engine/Point.h>
@@ -15,16 +13,19 @@ namespace sim
{
-using Action = std::function<void()>;
-
-
struct AIShip
{
- Action action;
engine::Point destination;
entt::entity target = entt::null;
};
+struct KeepAtRange
+{
+ double distance;
+ entt::entity target = entt::null;
+};
+
+
} // namespace sim
} // namespace kurator