Exemple #1
0
    private void Start()
    {
        //Reference
        ui          = UIRendererManager.Instance;
        towerPlacer = PlacementManager.Instance;

        //Initialize UI display for HUD items
        ui.DisplayWave(0);
        ui.DisplayLives(lives);
        ui.DisplayMoney(money);
    }
Exemple #2
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();
         }
     }
 }