From 2d6a2c5bc2d1fc97d24867c93efcdc9ec865a377 Mon Sep 17 00:00:00 2001 From: Joywayer Date: Thu, 21 May 2026 21:16:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20WallSlideState=20=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E9=80=BB=E8=BE=91=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=AF=B9?= =?UTF-8?q?=20WallCling=20=E8=83=BD=E5=8A=9B=E7=9A=84=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E4=BB=A5=E6=8F=90=E5=8D=87=E8=A7=92=E8=89=B2=E5=9C=A8=E5=A2=99?= =?UTF-8?q?=E5=A3=81=E9=99=84=E8=BF=91=E7=9A=84=E4=BA=A4=E4=BA=92=E4=BD=93?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/_Game/Scripts/Player/States/FallState.cs | 3 ++- Assets/_Game/Scripts/Player/States/JumpState.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Assets/_Game/Scripts/Player/States/FallState.cs b/Assets/_Game/Scripts/Player/States/FallState.cs index 1ea8419..b97455f 100644 --- a/Assets/_Game/Scripts/Player/States/FallState.cs +++ b/Assets/_Game/Scripts/Player/States/FallState.cs @@ -97,7 +97,8 @@ namespace BaseGames.Player.States int wallDir = wd.WallDirection; bool pressingTowardWall = Mathf.Abs(Input.MoveInput.x) > 0.01f && (int)Mathf.Sign(Input.MoveInput.x) == wallDir; - if (pressingTowardWall || Owner.IsPostWallJump) + if ((pressingTowardWall || Owner.IsPostWallJump) + && Stats != null && Stats.HasAbility(AbilityType.WallCling)) { _owner.TransitionTo(_owner.GetState()); return; diff --git a/Assets/_Game/Scripts/Player/States/JumpState.cs b/Assets/_Game/Scripts/Player/States/JumpState.cs index cb1675c..5f36c98 100644 --- a/Assets/_Game/Scripts/Player/States/JumpState.cs +++ b/Assets/_Game/Scripts/Player/States/JumpState.cs @@ -93,7 +93,8 @@ namespace BaseGames.Player.States int wallDir = wd.WallDirection; bool pressingTowardWall = Mathf.Abs(Input.MoveInput.x) > 0.01f && (int)Mathf.Sign(Input.MoveInput.x) == wallDir; - if (pressingTowardWall || Owner.IsPostWallJump) + if ((pressingTowardWall || Owner.IsPostWallJump) + && Stats != null && Stats.HasAbility(AbilityType.WallCling)) { _owner.TransitionTo(_owner.GetState()); return;