summaryrefslogtreecommitdiff
path: root/sim/include
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2023-04-27 00:36:46 +0200
committerAki <please@ignore.pl>2024-04-05 19:41:19 +0200
commit61d16477b01bcfbe8c3a481a232658ac60309f57 (patch)
tree06882f5a1b7bc987826610736a5b606883df69b9 /sim/include
parent94d6d863e1b78766cdb5f286e3d9f374c02c5d33 (diff)
downloadkurator-61d16477b01bcfbe8c3a481a232658ac60309f57.zip
kurator-61d16477b01bcfbe8c3a481a232658ac60309f57.tar.gz
kurator-61d16477b01bcfbe8c3a481a232658ac60309f57.tar.bz2
Extracted KeepAtRange action
It seems an abstraction level is of some kind is needed here. One thing to handle "AI", another to handle primitive commands and their execution.
Diffstat (limited to 'sim/include')
-rw-r--r--sim/include/kurator/sim/ai.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sim/include/kurator/sim/ai.h b/sim/include/kurator/sim/ai.h
index f9899d6..0ffa1cc 100644
--- a/sim/include/kurator/sim/ai.h
+++ b/sim/include/kurator/sim/ai.h
@@ -1,9 +1,13 @@
#pragma once
+#include <functional>
+
#include <entt/entt.hpp>
#include <kurator/engine/Point.h>
+#include "State.h"
+
namespace kurator
{
@@ -11,9 +15,12 @@ namespace sim
{
+using Action = std::function<void()>;
+
+
struct AIShip
{
- double keep_at_range;
+ Action action;
engine::Point destination;
entt::entity target = entt::null;
};