feat(ai): 新增 IEnemyLocomotion 接口与 LocomotionMode/PatrolStrategy 枚举
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace BaseGames.AI
|
||||
{
|
||||
/// <summary>移动执行器的行为模式。</summary>
|
||||
public enum LocomotionMode { Idle, Patrol, Face, Approach }
|
||||
|
||||
/// <summary>巡逻策略(Patrol 模式下的具体走法)。</summary>
|
||||
public enum PatrolStrategy { Wander, Pace, Waypoints }
|
||||
|
||||
/// <summary>
|
||||
/// 敌人移动执行器的声明式接口。AI/能力只"声明意图",执行在实现内部完成
|
||||
/// (AI 不 actuate)。实现见 BaseGames.Enemies.EnemyLocomotion。
|
||||
/// </summary>
|
||||
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; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e16952656bd1bf4584552879dbe8b7e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user