private void DrawGameLost() { scoreText.gameObject.SetActive(false); exitButton.gameObject.SetActive(false); gameLostObject.SetActive(true); lostScoreText.text = $"Score: {GameManager.instance.Score}"; lostQuitButton.onClick.AddListener(() => OnQuitButtonPressed?.Invoke()); }
private void DrawGameWon() { scoreText.gameObject.SetActive(false); exitButton.gameObject.SetActive(false); gameWonObject.SetActive(true); wonScoreText.text = $"Score: {GameManager.instance.Score}"; wonHighScoreText.text = $"Highscore: {PlayerData.instance.GetHighScore(GameManager.instance.LevelName)}"; wonQuitButton.onClick.AddListener(() => OnQuitButtonPressed?.Invoke()); }
private void Awake() { m_GameStartButton.onClick.AddListener(() => { OnStartButtonPressed?.Invoke(); }); m_QuitGameButton.onClick.AddListener(() => { OnQuitButtonPressed?.Invoke(); }); }