修复内容:

PlayerMovement:新增 _facingLocked 字段 + LockFacing(bool) 方法;UpdateFacing() 锁定时直接返回
WallSlideState:OnStateEnter 调用 LockFacing(true) + FlipFacing(_wallDir);OnStateExit 调用 LockFacing(false) 解锁
WallJumpState:OnStateEnter 保险性再调一次 LockFacing(false);WallJumpAway/Toward 同步写入 _inputVelocityX,确保解锁后 UpdateFacing 朝向正确(背墙跳 = 离墙方向,对墙跳 = 朝墙方向)
This commit is contained in:
2026-05-22 10:48:52 +08:00
parent 285ac46e31
commit 68d4c699ae
15 changed files with 235 additions and 418 deletions

View File

@@ -30,6 +30,7 @@ namespace BaseGames.Input
public event Action SpiritSkill2CancelledEvent;
public event Action SpellCastEvent;
public event Action InteractEvent;
public event Action InteractCancelledEvent;
// ── UI Events ─────────────────────────────────────────────────────────
public event Action PauseEvent;
@@ -177,7 +178,8 @@ namespace BaseGames.Input
BindStarted(_gameplay, "SpiritSkill2", () => SpiritSkill2StartedEvent?.Invoke());
BindCanceled(_gameplay, "SpiritSkill2", () => SpiritSkill2CancelledEvent?.Invoke());
BindStarted(_gameplay, "Spell", () => SpellCastEvent?.Invoke());
BindStarted(_gameplay, "Interact", () => InteractEvent?.Invoke());
BindStarted(_gameplay, "Interact", () => InteractEvent?.Invoke());
BindCanceled(_gameplay, "Interact", () => InteractCancelledEvent?.Invoke());
BindStarted(_gameplay, "Pause", HandlePause);