some jumping animations
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 18s
Create tag and build when new code gets to main / Export (push) Successful in 10m30s

This commit is contained in:
2026-01-20 13:23:42 +01:00
parent a257306999
commit 8d1e7ebb4f
8 changed files with 199 additions and 120 deletions

View File

@@ -324,6 +324,7 @@ public partial class PlayerController : CharacterBody3D,
private Transition _onJumpFromWall;
private Transition _onJumpFromWallFalling;
private Transition _onLeaveWallFromRun;
private Transition _onAirborneToGrounded;
private Transition _onGroundSlideJump;
private Transition _onAirGlideDoubleJump;
@@ -448,6 +449,7 @@ public partial class PlayerController : CharacterBody3D,
_onWallHanging = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Hanging"));
_onWallRunning = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Running"));
_onLeaveWallFromRun = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/Running/OnLeaveWall"));
_onAirborneToGrounded = Transition.Of(GetNode("StateChart/Root/Movement/Airborne/OnGrounded"));
// State timers
_powerCooldownTimer = GetNode<Timer>("PowerCooldown");
@@ -551,6 +553,7 @@ public partial class PlayerController : CharacterBody3D,
_onJumpFromWall.Taken += OnJumpFromWall;
_onJumpFromWallFalling.Taken += OnJumpFromWall;
_onLeaveWallFromRun.Taken += OnLeaveWallFromRun;
_onAirborneToGrounded.Taken += OnAirborneToGrounded;
}
///////////////////////////
@@ -645,6 +648,11 @@ public partial class PlayerController : CharacterBody3D,
}
}
public void OnAirborneToGrounded()
{
HeadSystem.OnJumpEnded();
}
public bool IsGroundLike()
{
return GroundDetector.GetCollisionResult().Count > 0;
@@ -1155,7 +1163,8 @@ public partial class PlayerController : CharacterBody3D,
_playerState.SendEvent("mantle");
return;
}
HeadSystem.OnJumpStarted();
if (WallHugSystem.IsWallHugging())
{
_playerState.SendEvent("wall_jump");
@@ -1280,11 +1289,10 @@ public partial class PlayerController : CharacterBody3D,
_mantlePath.Setup(transform, curve);
_mantleStartPosition = GlobalPosition;
var curveLength = curve.GetBakedLength();
var tween = GetTree().CreateTween();
tween.SetTrans(Tween.TransitionType.Linear);
tween.SetEase(Tween.EaseType.In);
tween.TweenProperty(_mantlePath.PathFollow, "progress_ratio", 1, MantleTime*curveLength);
tween.TweenProperty(_mantlePath.PathFollow, "progress_ratio", 1, MantleTime);
tween.Finished += MantleFinished;
}
public void HandleMantling(float delta)