Ejemplo n.º 1
0
 // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
 override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     boss3.Attack1State();
     boss3.targetPlayer();
     if (timer < 0)
     {
         animator.SetTrigger("idle");
     }
     else
     {
         timer -= Time.deltaTime;
     }
 }
Ejemplo n.º 2
0
 // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
 override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     boss3.Attack1State();
     boss3.Boom.SetActive(true);
     if (timer < 0)
     {
         animator.SetTrigger("attack2Open");
     }
     else
     {
         timer -= Time.deltaTime;
     }
 }
Ejemplo n.º 3
0
 // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
 override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     boss3.Attack1State();
     if (boss3.curHealth <= 0)
     {
         animator.SetTrigger("dead");
     }
     if (boss3.facingLeft)
     {
         animator.transform.rotation = Quaternion.Euler(0f, 0f, 0f);
     }
     else
     {
         animator.transform.rotation = Quaternion.Euler(0f, -180f, 0f);
     }
 }