单向平台

This commit is contained in:
2026-05-21 11:44:01 +08:00
parent 94113a9c1b
commit 67e2d3a8ff
7 changed files with 107 additions and 14 deletions

View File

@@ -25,6 +25,13 @@ namespace BaseGames.Player.States
_owner.TransitionTo(_owner.GetState<FallState>());
return;
}
// 单向平台穿落:↓ + 跳跃键,优先于普通跳跃
if (Move.OnOneWayPlatform && Input.MoveInput.y < -0.5f && Buffer.ConsumeJump())
{
Move.DropThroughPlatform();
_owner.TransitionTo(_owner.GetState<FallState>());
return;
}
if (Buffer.ConsumeJump())
{
_owner.TransitionTo(_owner.GetState<JumpState>());