diff --git a/Assets/_Game/Scripts/Enemies/IPathAgent.cs b/Assets/_Game/Scripts/Enemies/IPathAgent.cs index c4c804d6..bc41b14a 100644 --- a/Assets/_Game/Scripts/Enemies/IPathAgent.cs +++ b/Assets/_Game/Scripts/Enemies/IPathAgent.cs @@ -77,6 +77,15 @@ namespace BaseGames.Enemies /// bool ResolveStandablePoint(Vector2 target, out Vector2 standable); + /// + /// 上次寻路移动是否因目标不可达/被挡而受阻(走到最近可达点或原地停下,而非到达原目标)。 + /// 供意图层(Locomotion)判断本次移动应否视为结算/推进。对新目标 RequestMoveTo 后复位。 + /// + bool LastMoveObstructed { get; } + + /// 取上次寻路失败时算出的最近可达世界点(尽力贴近目标的点)。无则返回 false。 + bool TryGetClosestReachable(out Vector2 worldPos); + // ── 连接段事件 ────────────────────────────────────────────────── /// 开始穿越连接段时触发(传入连接段类型)。 event Action OnLinkStarted; @@ -108,6 +117,8 @@ namespace BaseGames.Enemies public bool WalkToRandom() => false; public bool WalkToRandomOnSegment() => false; public bool ResolveStandablePoint(Vector2 target, out Vector2 standable) { standable = target; return false; } + public bool LastMoveObstructed => false; + public bool TryGetClosestReachable(out Vector2 worldPos) { worldPos = Vector2.zero; return false; } public event Action OnLinkStarted { add { } remove { } } public event Action OnLinkCompleted{ add { } remove { } } public event Action OnNavPathFailed { add { } remove { } }