Example #1
0
 public void ReduceLife()
 {
     //If game is still running, reduce life points.
     if (gameState == GameStates.WaveStarted)
     {
         --lives;
         ui.DisplayLives(lives);
         ui.OnDamaged();
         //Game is over when no more hp left.
         if (lives <= 0)
         {
             GameOver();
         }
     }
 }