This commit is contained in:
2026-04-09 09:34:46 +07:00
parent 8ef5ecbe0f
commit 943cb48056
6 changed files with 2063 additions and 13 deletions

View File

@@ -12,12 +12,13 @@ namespace OnlyScove.Scripts
public override void Enter()
{
// Play the Parkour animation (Step Up)
stateMachine.Anim.CrossFadeInFixedTime(parkourHash, 0.1f);
if (stateMachine.Anim != null && stateMachine.Anim.layerCount > 0)
{
// Play the Parkour animation (Step Up)
// Use the overload with layer index 0 to be explicit
stateMachine.Anim.CrossFadeInFixedTime(parkourHash, 0.1f, 0);
}
// We'll wait for the animation to finish.
// In a real project, you might get the exact duration from the Animator.
// For now, we'll assume a fixed duration or check state.
timer = 0f;
}