feat(enemy): ContactChaseAbility 改造为 RushAbility(冲锋)

- 起手前锁定玩家 X 与方向(committed),终点改为身体整体越过锁定点(Body.HasPassed)
- 终止条件:越过锁定点/撞墙(只判墙)/最大冲刺时长(SO 新增 maxDashDuration)/净位移卡死
- 冲锋期间经 EnemyMoveInput.AllowLedgeCross 放开悬崖夹紧,可冲下崖不悬停边缘
- 类与文件重命名(GUID 保留),脚手架与向导同步更新
This commit is contained in:
2026-07-27 13:38:05 +08:00
parent 7cba58919f
commit 4808077fc6
11 changed files with 215 additions and 146 deletions
@@ -583,8 +583,8 @@ namespace BaseGames.Editor
/// <summary>返回指定敌人类型的 (abilityFileName, abilityId, soType) 定义列表。</summary>
private static (string ablName, string ablId, System.Type soType)[] GetEnemyAbilityDefs(string enemyId) => enemyId switch
{
// Alert/警觉张口已是纯 locomotion 模式(LocomotionMode.Face),非能力;起手张口并入 ContactChaseAbility 的 Skill_Start。
"E001" => new[] { ("Chase", "e001_chase", typeof(ContactChaseAbilitySO)) },
// Alert/警觉张口已是纯 locomotion 模式(LocomotionMode.Face),非能力;起手张口并入 RushAbility 的 Skill_Start。
"E001" => new[] { ("Chase", "e001_chase", typeof(RushAbilitySO)) },
"E002" => new[] { ("CeilingStrike", "e002_ceiling_strike", typeof(CeilingHangStrikeAbilitySO)) },
"E003" => new[] { ("Fall", "e003_fall", typeof(AnimatedCeilingDropAbilitySO)) },
"E004" => new[] { ("Appear", "e004_appear", typeof(AppearAbilitySO)),
@@ -595,7 +595,7 @@ namespace BaseGames.Editor
"E005" => new[] { ("Bite", "e005_bite", typeof(EnemyAbilitySO)),
("Acid", "e005_acid", typeof(EnemyAbilitySO)) },
"E006" => new[] { ("Leap", "e006_leap", typeof(EnemyAbilitySO)),
("Chase", "e006_chase", typeof(ContactChaseAbilitySO)) },
("Chase", "e006_chase", typeof(RushAbilitySO)) },
_ => System.Array.Empty<(string, string, System.Type)>(),
};
@@ -456,8 +456,8 @@ namespace BaseGames.Editor
// Model AAI 只决策触发哪个能力(Idle/Patrol/Alert 已改为纯移动意图,由 EnemyLocomotion 执行,无需挂能力组件)
Transform abilitiesT = GetOrCreateChild(go.transform, "Abilities");
Transform chaseT = GetOrCreateChild(abilitiesT, "ContactChaseAbility_Chase");
ContactChaseAbility chaseAbility = GetOrAddComponent<ContactChaseAbility>(chaseT.gameObject);
Transform chaseT = GetOrCreateChild(abilitiesT, "RushAbility_Chase");
RushAbility chaseAbility = GetOrAddComponent<RushAbility>(chaseT.gameObject);
// SOs — assign first so OnValidate doesn't warn during wiring
AssignAsset(enemyBase, "_statsSO", report, false, "ENM_E001_Stats");
@@ -995,8 +995,8 @@ namespace BaseGames.Editor
Transform abilitiesT = GetOrCreateChild(go.transform, "Abilities");
Transform leapT = GetOrCreateChild(abilitiesT, "LeapAttackAbility");
LeapAttackAbility leapAbl = GetOrAddComponent<LeapAttackAbility>(leapT.gameObject);
Transform chaseT = GetOrCreateChild(abilitiesT, "ContactChaseAbility");
ContactChaseAbility chaseAbl = GetOrAddComponent<ContactChaseAbility>(chaseT.gameObject);
Transform chaseT = GetOrCreateChild(abilitiesT, "RushAbility");
RushAbility chaseAbl = GetOrAddComponent<RushAbility>(chaseT.gameObject);
// SOs — assign first so OnValidate doesn't warn during wiring
AssignAsset(enemyBase, "_statsSO", report, false, "ENM_E006_Stats");