Exemple #1
0
 // Update is called once per frame
 void Update()
 {
     if (!pauseMenu.isGameInPause())
     {
         refleshStatus();
         if ((currentLife <= 0) || ((fromBoss != null) && ("isDie").Equals(fromBoss.getState())))
         {
             die();
         }
         else
         {
             enemyIA();
         }
     }
 }
Exemple #2
0
 // Update is called once per frame
 void Update()
 {
     if (!pauseMenu.isGameInPause())
     {
         refleshStatus();
         if ((currentLife <= 0) || ((fromBoss != null) && ("isDie").Equals(fromBoss.getState())))
         {
             timeToAttack = 0;
             timeInAttack = TIME_IN_ATTACK;
             die();
         }
         else
         {
             enemyIA();
         }
     }
 }
Exemple #3
0
 void FixedUpdate()
 {
     if (enemy != null)
     {
         if (("isDead").Equals(enemy.getState()))
         {
             DestroyImmediate(this.gameObject);
         }
     }
     if (boss != null)
     {
         if (("isDead").Equals(boss.getState()))
         {
             DestroyImmediate(this.gameObject);
         }
     }
 }