From d3136266d168c4158d226fcfd77318f57b76ebd5 Mon Sep 17 00:00:00 2001 From: Joywayer Date: Fri, 22 May 2026 11:01:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20FallState=20=E5=92=8C=20Wa?= =?UTF-8?q?llSlideState=20=E7=9A=84=E7=8A=B6=E6=80=81=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=AF=B9=20WallCl?= =?UTF-8?q?ing=20=E8=83=BD=E5=8A=9B=E7=9A=84=E6=A3=80=E6=9F=A5=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E5=9C=A8=E6=8A=93=E5=A2=99=E6=97=B6=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E7=A9=BA=E4=B8=AD=E5=86=B2=E5=88=BA=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/_Game/Scripts/Player/States/FallState.cs | 7 ++++++- Assets/_Game/Scripts/Player/States/WallSlideState.cs | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Assets/_Game/Scripts/Player/States/FallState.cs b/Assets/_Game/Scripts/Player/States/FallState.cs index 41ed25d..14bccdd 100644 --- a/Assets/_Game/Scripts/Player/States/FallState.cs +++ b/Assets/_Game/Scripts/Player/States/FallState.cs @@ -112,7 +112,12 @@ namespace BaseGames.Player.States if ((pressingTowardWall || Owner.IsPostWallJump) && Stats != null && Stats.HasAbility(AbilityType.WallCling)) { - _owner.TransitionTo(_owner.GetState()); + var wss = _owner.GetState(); + if (wss != null) + { + wss.PrepareEnter(wallDir); + _owner.TransitionTo(wss); + } return; } } diff --git a/Assets/_Game/Scripts/Player/States/WallSlideState.cs b/Assets/_Game/Scripts/Player/States/WallSlideState.cs index 36e9a9f..5276734 100644 --- a/Assets/_Game/Scripts/Player/States/WallSlideState.cs +++ b/Assets/_Game/Scripts/Player/States/WallSlideState.cs @@ -73,6 +73,9 @@ namespace BaseGames.Player.States if (AnimCfg?.WallSlide != null) Anim?.Play(AnimCfg.WallSlide); + // 抓墙时恢复空中冲刺次数(与蹬墙跳一致) + Owner.GetState()?.ResetDashCharge(); + // 消耗蹬墙跳后的自动抓墙标记 Owner.SetPostWallJump(false);