diff --git a/Assets/_Game/Scripts/AI/IEnemyLocomotion.cs b/Assets/_Game/Scripts/AI/IEnemyLocomotion.cs new file mode 100644 index 00000000..f68c4c7a --- /dev/null +++ b/Assets/_Game/Scripts/AI/IEnemyLocomotion.cs @@ -0,0 +1,25 @@ +using UnityEngine; + +namespace BaseGames.AI +{ + /// 移动执行器的行为模式。 + public enum LocomotionMode { Idle, Patrol, Face, Approach } + + /// 巡逻策略(Patrol 模式下的具体走法)。 + public enum PatrolStrategy { Wander, Pace, Waypoints } + + /// + /// 敌人移动执行器的声明式接口。AI/能力只"声明意图",执行在实现内部完成 + /// (AI 不 actuate)。实现见 BaseGames.Enemies.EnemyLocomotion。 + /// + public interface IEnemyLocomotion + { + void SetMode(LocomotionMode mode); // Idle(停) / Patrol(按配置策略游走) + void Approach(Transform target); // 持续跟随,派生 RunSpeed + void MoveTo(Vector2 point); // 一次性目标点 + void Face(Vector2 lookAt); // 停 + 朝向 + void Stop(); + LocomotionMode CurrentMode { get; } + bool IsMoving { get; } + } +} diff --git a/Assets/_Game/Scripts/AI/IEnemyLocomotion.cs.meta b/Assets/_Game/Scripts/AI/IEnemyLocomotion.cs.meta new file mode 100644 index 00000000..4af75a58 --- /dev/null +++ b/Assets/_Game/Scripts/AI/IEnemyLocomotion.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2e16952656bd1bf4584552879dbe8b7e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: