优化 FallState 和 WallSlideState 的状态切换逻辑,增加对 WallCling 能力的检查,并在抓墙时恢复空中冲刺次数
This commit is contained in:
@@ -112,7 +112,12 @@ namespace BaseGames.Player.States
|
||||
if ((pressingTowardWall || Owner.IsPostWallJump)
|
||||
&& Stats != null && Stats.HasAbility(AbilityType.WallCling))
|
||||
{
|
||||
_owner.TransitionTo(_owner.GetState<WallSlideState>());
|
||||
var wss = _owner.GetState<WallSlideState>();
|
||||
if (wss != null)
|
||||
{
|
||||
wss.PrepareEnter(wallDir);
|
||||
_owner.TransitionTo(wss);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user