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 Awake() { my_PauseButton.onClick.AddListener(() => { OnPauseButtonPressed?.Invoke(); }); }