Exemple #1
0
        private void Start()
        {
            SetPauseMenuVisibility(false);

            continueButton.onClick.AddListener(() =>
            {
                Time.timeScale = 1f;
                OnContinueButtonPressed?.Invoke();
                SetPauseMenuVisibility(false);
            });

            pauseButton.onClick.AddListener(() =>
            {
                Time.timeScale = 0f;
                OnPauseButtonPressed?.Invoke();
                SetPauseMenuVisibility(true);
            });

            exitButton.onClick.AddListener(() =>
            {
                Time.timeScale = 1f;
                OnExitButtonPressed?.Invoke();
                StartCoroutine(sceneService.LoadSceneAsync(SceneType.Menu));
            });
        }
    private void OnEnable()
    {
        button.onClick.AddListener(() => OnContinueButtonPressed?.Invoke());

        TutorialManager.OnTutorialBegin += OnTutorialBegin;
        TutorialManager.OnTutorialEnd   += OnTutorialEnd;
        TutorialManager.OnCurrentTutorialPageChanged += OnCurrentTutorialPageChanged;
    }