Example #1
0
 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());
 }
Example #2
0
 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();
            });
        }