Example #1
0
 public void PlayerDie()
 {
     lifes--;
     if (lifes <= 0)
     {
         infoPlayer.CountPlayerDie();
         SceneManager.LoadScene("DieMenu");
     }
     else
     {
         textLifes.text = TEXT_LIFES + lifes;
     }
 }
 public void PlayerDie()
 {
     lifes--;
     infoPlayer.CountPlayerDie();
     if (lifes > 0)
     {
         textLifes.text = TEXT_LIFES + lifes;
     }
     else
     {
         SceneManager.LoadScene("GameOver");
     }
 }