protected override void Start()
 {
     _menuBtn.onClick.AddListener(() =>
     {
         Time.timeScale = 1;
         OnLoadSelectLevel?.Invoke();
     });
 }
Exemple #2
0
        protected override void Start()
        {
            if (PlayerSettingsService.HasReturnToSelectLevel)
            {
                OnLoadSelectLevel?.Invoke();
            }

            selectLevelBtn.onClick.AddListener(() => { OnLoadSelectLevel?.Invoke(); });
            settingsBtn.onClick.AddListener(() =>
            {
                content.SetActive(false);
                OnLoadSettings?.Invoke();
            });
            exitGameBtn.onClick.AddListener(Application.Quit);
        }
        protected override void Start()
        {
            _menuBtn.onClick.AddListener(() =>
            {
                // Pause time
                Time.timeScale = 1;
                OnLoadSelectLevel?.Invoke();
            });

            _retryBtn.onClick.AddListener(() =>
            {
                // Pause time
                Time.timeScale = 1;
                SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
            });
        }
Exemple #4
0
        protected override void Start()
        {
            OnInitBestScore?.Invoke(_scoreTxt);

            if (PlayerSettingsService.HasReturnToSelectLevel)
            {
                OnLoadSelectLevel?.Invoke();
            }

            _selectLevelBtn.onClick.AddListener(() => { OnLoadSelectLevel?.Invoke(); });
            _settingsBtn.onClick.AddListener(() =>
            {
                _content.SetActive(false);
                OnLoadSettings?.Invoke();
            });
            _exitGameBtn.onClick.AddListener(Application.Quit);
        }