BITFALL/Assets/AmplifyAnimationPack/Scripts/Character/CharacterStates/RollState.cs

31 lines
545 B
C#
Raw Normal View History

2024-04-15 14:57:50 +08:00
// Amplify Animation Pack - Third-Person Character Controller
// Copyright (c) Amplify Creations, Lda <info@amplify.pt>
namespace AmplifyAnimationPack
{
public class RollState : CharacterStateBase
{
public override void EnterState()
{
charRef.canMove = false;
charRef.canFallOffRoll = false;
charRef.ChangeMovementType( CharacterMovementTypes.roll );
}
public override void ExitState()
{
}
public override void UpdateState()
{
if( charRef.canFallOffRoll )
{
charRef.CheckIsGrounded();
}
}
}
}