// 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(); } }
public void OnPlayButton() { gameObject.SetActive(false); bounceCounter.Reset(); lifeCounter.Reset(); }