From 52b0bdaba5b38790d144bf1e800ea34be937ded0 Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 4 May 2023 00:07:51 +0200 Subject: 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. --- sim/include/kurator/sim/ai.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'sim/include') 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 - #include #include @@ -15,16 +13,19 @@ namespace sim { -using Action = std::function; - - 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 -- cgit v1.1