BITFALL/Assets/AmplifyAnimationPack/Scripts/Character/AnimStatesBehavior/CoverMoveStateBehavior.cs

20 lines
553 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>
using UnityEngine;
namespace AmplifyAnimationPack
{
public class CoverMoveStateBehavior : StateMachineBehaviour
{
// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
override public void OnStateEnter( Animator animator , AnimatorStateInfo stateInfo , int layerIndex )
{
animator.SetFloat( "CoverSide" , Mathf.Sign( animator.GetFloat( "InputRight" ) ) );
}
}
}