void EndtheGame(GameObject won) { won.SetActive(true); EndGameScreen.SetActive(true); Destroy(pauseMenuUI); Destroy(ball); }
private void OnCollisionEnter2D(Collision2D other) { if (other.gameObject.tag == "Enemy") { StaticVars.StartGame = false; StaticVars.MinigameSpeed = 600; EndGameScreen.SetActive(true); GetComponent <AudioSource>().Play(); } }
public void OnClickReturnToMenu() { SceneManager.LoadScene(0); EndGameScreen.SetActive(false); }
void ShowEndScreen(string text) { EndGameScreen.SetActive(true); EndGameScreen.transform.Find("Content/Upper/Result/Text").GetComponent <Text>().text = text; EndGameScreen.transform.Find("Content/Upper/Score/Text").GetComponent <Text>().text = "Puntos: " + Player.Instance.Score; }