Exemplo n.º 1
0
 // This is where death management is taken care of
 public void LoseLife()
 {
     lives      -= 1;
     myText.text = string.Format("Lives: {0}", lives.ToString());
     if (lives >= 0)
     {
         StartCoroutine(RespawnPlayer());
     }
     else
     {
         LifeCounter.Reset();
         GameObject.Find("LevelManager").GetComponent <LevelManager>().LoadNextLevel();
     }
 }
Exemplo n.º 2
0
 public void OnPlayButton()
 {
     gameObject.SetActive(false);
     bounceCounter.Reset();
     lifeCounter.Reset();
 }