fix(ai): AiRuntime 自转换设为no-op(根治死亡双发Died再入) + EnemyBase.OnSpawn复位brain.enabled + 测试
Switch 对 target==当前态直接 no-op(不重跑Exit/Enter),循环改为 if(Switch(t))return true; OnSpawn 复用时恢复被 QuotaManager 裁剪禁用的 brain。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -724,6 +724,7 @@ namespace BaseGames.Enemies
|
||||
_abilities.InterruptAll(InterruptReason.Dead);
|
||||
|
||||
// 重置决策层(回到 Entry、清临时态)
|
||||
if (_brain != null) _brain.enabled = true; // 复用时恢复决策组件(可能曾被 QuotaManager 裁剪禁用)
|
||||
_brain?.ResetBrain();
|
||||
|
||||
// 通知配置型出生行为组件(如 EnemyAbilityTrigger)执行出生触发逻辑
|
||||
|
||||
Reference in New Issue
Block a user