Exemple #1
0
 void RunLevel()
 {
     if (Input.GetKeyDown(KeyCode.P))
     {
         planeWins    = true;
         currentState = GameState.Ending;
     }
     //check Plane Health
     if (!planeHealth.IsAlive())
     {
         planeWins    = false;
         currentState = GameState.Ending;
     }
     else if (towerController.AllTowersDisabled())
     {
         planeWins = true;
         planeHealth.GetComponent <PlayerBombControl>().enabled = false;
         currentState = GameState.Ending;
     }
     //Check tower status
 }