refactor(ai): Chase 走 Locomotion.Approach;删除 Idle/Patrol/Alert 协程能力与 SO
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -36,11 +36,9 @@ namespace BaseGames.Enemies.Abilities
|
||||
|
||||
// 追击直到玩家消失或被 AI 中断(退出追击的决策归 AI,见 EnemyBrainContext.InterruptAbilities)。
|
||||
// 小怪走 nav 寻路(EnemyBase.MoveTo → 导航),寻路正确性依赖脚手架把碰撞体底部对齐 y=0。
|
||||
_enemy.Locomotion?.Approach(_enemy.PlayerTransform);
|
||||
while (_enemy.PlayerTransform != null)
|
||||
{
|
||||
_enemy.MoveTo(_enemy.PlayerTransform.position);
|
||||
yield return null;
|
||||
}
|
||||
|
||||
CleanupChase();
|
||||
|
||||
@@ -57,7 +55,7 @@ namespace BaseGames.Enemies.Abilities
|
||||
{
|
||||
if (_contactDamage != null)
|
||||
_contactDamage.enabled = false;
|
||||
_enemy.StopMovement();
|
||||
_enemy.Locomotion?.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user