diff options
Diffstat (limited to 'sim/include')
-rw-r--r-- | sim/include/kurator/sim/TurretControl.h | 25 | ||||
-rw-r--r-- | sim/include/kurator/sim/ai.h | 23 | ||||
-rw-r--r-- | sim/include/kurator/sim/components.h | 8 | ||||
-rw-r--r-- | sim/include/kurator/sim/weapons.h | 31 |
4 files changed, 54 insertions, 33 deletions
diff --git a/sim/include/kurator/sim/TurretControl.h b/sim/include/kurator/sim/TurretControl.h deleted file mode 100644 index ecafb90..0000000 --- a/sim/include/kurator/sim/TurretControl.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include <entt/entt.hpp> - -#include "State.h" - - -namespace kurator -{ -namespace sim -{ - - -struct TurretControl -{ - double delay; - double reload; - int rounds; - entt::entity owner; - static void update(State& ctx); -}; - - -} // namespace sim -} // namespace kurator diff --git a/sim/include/kurator/sim/ai.h b/sim/include/kurator/sim/ai.h new file mode 100644 index 0000000..f9899d6 --- /dev/null +++ b/sim/include/kurator/sim/ai.h @@ -0,0 +1,23 @@ +#pragma once + +#include <entt/entt.hpp> + +#include <kurator/engine/Point.h> + + +namespace kurator +{ +namespace sim +{ + + +struct AIShip +{ + double keep_at_range; + engine::Point destination; + entt::entity target = entt::null; +}; + + +} // namespace sim +} // namespace kurator diff --git a/sim/include/kurator/sim/components.h b/sim/include/kurator/sim/components.h index f329c0e..c4d8abc 100644 --- a/sim/include/kurator/sim/components.h +++ b/sim/include/kurator/sim/components.h @@ -25,13 +25,5 @@ struct Team }; -struct AIState -{ - double keep_at_range; - engine::Point destination; - entt::entity target = entt::null; -}; - - } // namespace sim } // namespace kurator diff --git a/sim/include/kurator/sim/weapons.h b/sim/include/kurator/sim/weapons.h new file mode 100644 index 0000000..7dd5b3b --- /dev/null +++ b/sim/include/kurator/sim/weapons.h @@ -0,0 +1,31 @@ +#pragma once + +#include <entt/entt.hpp> + +#include <kurator/universe/TurretType.h> + +#include "State.h" + + +namespace kurator +{ +namespace sim +{ + + +struct Turret +{ + entt::entity owner; + universe::TurretType type; + double delay = 0.0; + double reload = 0.0; + int rounds = type.rounds; + void shoot_at(State& ctx, const entt::entity& target, double distance); +}; + + +void update_turrets(State& ctx); + + +} // namespace sim +} // namespace kurator |