public void PlayAir(Animator animator, ref string currentHitAnimationName, BooleanComparator booleanComparator) { if (currentHitAnimationName == airAnimation) { return; } currentHitAnimationName = airAnimation; animator.Play(airAnimation); booleanComparator.SetValue(airAnimation, true); }
public void PlayHeavy(Animator animator, ref string currentHitAnimationName, BooleanComparator booleanComparator) { randomNumber = Random.Range(0, heavyAnimation.Length); while (currentHitAnimationName == heavyAnimation[randomNumber]) { randomNumber = Random.Range(0, heavyAnimation.Length); } currentHitAnimationName = heavyAnimation[randomNumber]; animator.Play(heavyAnimation[randomNumber]); booleanComparator.SetValue(heavyAnimation[randomNumber], true); }