refactor AI system
This commit is contained in:
13
src/lib/ecs/component/AttackBehavior.h
Normal file
13
src/lib/ecs/component/AttackBehavior.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include "entt/entity/entity.hpp"
|
||||
|
||||
// Combat behavior for ships with weapons (was ThreatResponseBehaviorComponent).
|
||||
// The evaluator sets currentTarget; the executor pushes it to in-range weapons.
|
||||
struct AttackBehavior
|
||||
{
|
||||
std::optional<entt::entity> currentTarget;
|
||||
float score = 0.0f;
|
||||
};
|
||||
Reference in New Issue
Block a user