Ejemplo n.º 1
0
 public void YouWon()
 {
     if (health > 0)
     {
         YouWin.SetActive(true);
         OnEndMessage?.Invoke();
     }
 }
Ejemplo n.º 2
0
 public void LoseHealth(int lostHP)
 {
     health -= lostHP;
     if (health <= 0)
     {
         Debug.Log("GAME OVER! YOU LOSE!");
         GameOver.SetActive(true);
         OnEndMessage?.Invoke();
     }
 }