示例#1
0
        public override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
        {
            ant.Move(0);
            if (timer < 0)
            {
                animator.SetBool("Movement", true);
            }
            else
            {
                timer -= Time.deltaTime;
            }

            if (ant.IsEntityVisible())
            {
                animator.SetBool("Rage", true);
            }
        }
示例#2
0
        public override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
        {
            if (timer < 0)
            {
                ChangeDirection(animator);
            }
            else
            {
                timer -= Time.deltaTime;
            }

            if (ant.IsHitWall())
            {
                ChangeDirection(animator);
            }

            if (ant.IsEntityVisible())
            {
                animator.SetBool("Rage", true);
            }

            ant.Move(movement * Time.deltaTime);
        }