public void UpdateLife() { lives -= 1; playerLives.UpdateText(); audioManager.Play("Explosion"); Instantiate(explosion, transform.position, transform.rotation); if (lives <= 0) { Destroy(gameObject); } }
public void RestartButton() { //Time.timeScale = 1f; processingScript.hueChnage = 0; processingScript.ChangeHueProfileOne(); scoreScript.score = 0; scoreScript.UpdateText(); livesScript.dead = false; livesScript.lives = 3; gameOverScreen.gameObject.SetActive(false); restartButton.SetActive(false); quitButton.SetActive(false); scoreText.SetActive(false); highScoreText.SetActive(false); livesScript.UpdateText(); timerScriprt.playerGrid.SetActive(false); //playerGrid.GetComponent<MeshRenderer>().enabled = false; }