Beispiel #1
0
 void checkBattleOver()
 {
     if (playerHP <= 0)
     {
         stateQueue.Add(BattleScreenStates.FightStates.LOSE);
     }
     if (enemyHP <= 0 && !enemies[0].getDead())
     {
         enemies[0].setDead(true);
         activeTime.disable();
         checkIfAllAreDead();
         print("Setting Enemy Dead");
         // transform.GetComponentInParent<BattleHolderScript>().player.GetComponent<PlayerMovement>().CmdRemoveEnemy(infoDump.gameObject);
     }
     if (numEnemies >= 2 && enemy2HP <= 0 && !enemies[1].getDead())
     {
         enemies[1].setDead(true);
         enemy2ActiveTime.disable();
         checkIfAllAreDead();
         // transform.GetComponentInParent<BattleHolderScript>().player.GetComponent<PlayerMovement>().CmdRemoveEnemy(infoDump.gameObject);
     }
     if (numEnemies == 3 && enemy3HP <= 0 && !enemies[2].getDead())
     {
         enemies[2].setDead(true);
         enemy3ActiveTime.disable();
         checkIfAllAreDead();
         //  transform.GetComponentInParent<BattleHolderScript>().player.GetComponent<PlayerMovement>().CmdRemoveEnemy(infoDump.gameObject);
     }
 }