public void GameOver() { isGameOver = true; FindObjectOfType <AudioManager>().Play("GameOver"); StartCoroutine(WaitForPannel()); if (isNewHighscore) { NewHighScoreGO.SetActive(true); } Destroy(Player); }
public void OnAddScore() { if (isGameOver == false) { currentScore += 1; FindObjectOfType <AudioManager>().Play("LevelUp"); if (colorcollectorsaveload.highscore < currentScore) { NewHighScoreGO.SetActive(true); colorcollectorsaveload.highscore = currentScore; colorcollectorsaveload.Save(); } UpdateUI(); } }