using Unity.VisualScripting;
using UnityEngine;
public class TakeDamageAnimationNotification : StateMachineBehaviour
{
AnimatorSupportScript m_animSupport;
//This tells the animated object when the injury animation is finished
//playing, so it can handle stuff like invuln time and control freeze
public override void OnStateExit(Animator animator,
AnimatorStateInfo stateInfo, int layerIndex)
{
if (m_animSupport == null)
{
m_animSupport = animator.GetComponent<AnimatorSupportScript>();
}
m_animSupport.r_owner.StopTakingDamage();
}
public override void OnStateEnter(Animator animator,
AnimatorStateInfo stateInfo, int layerIndex)
{
}
}