feat(enemy): ContactChaseAbility 改造为 RushAbility(冲锋)
- 起手前锁定玩家 X 与方向(committed),终点改为身体整体越过锁定点(Body.HasPassed) - 终止条件:越过锁定点/撞墙(只判墙)/最大冲刺时长(SO 新增 maxDashDuration)/净位移卡死 - 冲锋期间经 EnemyMoveInput.AllowLedgeCross 放开悬崖夹紧,可冲下崖不悬停边缘 - 类与文件重命名(GUID 保留),脚手架与向导同步更新
This commit is contained in:
@@ -266,11 +266,20 @@ namespace BaseGames.Enemies
|
||||
}
|
||||
|
||||
public virtual void MoveInDirectionWithSpeed(float dir, float speed)
|
||||
=> MoveInDirectionWithSpeed(dir, speed, false);
|
||||
|
||||
/// <summary>
|
||||
/// 显式速度移动;<paramref name="allowLedgeCross"/> = true 时允许冲出崖沿并自由落体
|
||||
/// (committed 冲锋用,避免被移动层的悬崖夹紧停在边缘)。
|
||||
/// 该许可随移动意图存续,StopMovement() 时自动复位。
|
||||
/// </summary>
|
||||
public virtual void MoveInDirectionWithSpeed(float dir, float speed, bool allowLedgeCross)
|
||||
{
|
||||
if (_movement == null) return;
|
||||
_movement.PendingInput.MoveDir = dir;
|
||||
_movement.PendingInput.MoveSpeed = speed;
|
||||
_movement.PendingInput.WantStop = false; // 移动意图覆盖停止脉冲
|
||||
_movement.PendingInput.MoveDir = dir;
|
||||
_movement.PendingInput.MoveSpeed = speed;
|
||||
_movement.PendingInput.AllowLedgeCross = allowLedgeCross;
|
||||
_movement.PendingInput.WantStop = false; // 移动意图覆盖停止脉冲
|
||||
}
|
||||
|
||||
public virtual void StopMovement()
|
||||
|
||||
Reference in New Issue
Block a user