public void PlayAgainClick() { Score = 0; LostPanel.SetActive(false); Player.GetComponent<Player>().Prepare(); StartCoroutine("CountDown"); }
public void ExitToMenuClick() { Time.timeScale = 1; DestroyObjects(); PausePanel.SetActive(false); MenuCanvas.SetActive(true); HUDCanvas.SetActive(false); LostPanel.SetActive(false); Player.SetActive(false); Generator.SetActive(false); }
private void Start() { ScoreText = GameObject.Find("ScoreText").GetComponent<Text>(); FinalScoreText = GameObject.Find("FinalScoreText").GetComponent<Text>(); HighScoreText = GameObject.Find("HighScoreText").GetComponent<Text>(); CountDownText = GameObject.Find("CountDownText").GetComponent<Text>(); Objects = GameObject.Find("Objects"); LostPanel = GameObject.Find("Lost"); Player = GameObject.Find("Player"); Player.SetActive(false); LostPanel.SetActive(false); HUDCanvas.SetActive(false); CountDownText.gameObject.SetActive(false); HighScore = PlayerPrefs.GetInt("HighScore", 0); Play = false; }