void OnMouseDown() { PauseButtonClicked?.Invoke(); Scene activeScene = SceneManager.GetActiveScene(); if (!PauseClick) { PauseClick = true; ScreenBlur.SetActive(true); blurTransparencyChange.ButtonClicked = !blurTransparencyChange.ButtonClicked; if (activeScene.buildIndex > 5) { Time.timeScale = 0.0f; AndroidControlls.GameIsPaused = true; TapControlls.GameIsPaused = true; } } else if (PauseClick) { PauseClick = false; blurTransparencyChange.ButtonClicked = !blurTransparencyChange.ButtonClicked; if (activeScene.buildIndex > 5) { Time.timeScale = 1.0f; AndroidControlls.GameIsPaused = false; TapControlls.GameIsPaused = false; } } }
private void RaisePauseEvent() { PauseButtonClicked?.Invoke(); }