예제 #1
0
    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;
            }
        }
    }
예제 #2
0
파일: HUD.cs 프로젝트: Artemiy42/TenTen
 private void RaisePauseEvent()
 {
     PauseButtonClicked?.Invoke();
 }