コード例 #1
0
        public void PlayAir(Animator animator, ref string currentHitAnimationName, BooleanComparator booleanComparator)
        {
            if (currentHitAnimationName == airAnimation)
            {
                return;
            }
            currentHitAnimationName = airAnimation;

            animator.Play(airAnimation);
            booleanComparator.SetValue(airAnimation, true);
        }
コード例 #2
0
        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);
        }