Exemple #1
0
        public void OnPauseButton()
        {
            _GameState gameState = GameControl.GetGameState();

            if (gameState == _GameState.Over)
            {
                return;
            }

            if (toggleFastForward.isOn)
            {
                toggleFastForward.isOn = false;
            }

            if (gameState == _GameState.Pause)
            {
                GameControl.ResumeGame();
                UIPauseMenu.Hide();
            }
            else
            {
                GameControl.PauseGame();
                UIPauseMenu.Show();
            }
        }
Exemple #2
0
 void Awake()
 {
     instance = this;
     thisObj  = gameObject;
     transform.localPosition = Vector3.zero;
     sliderMusicVolume.value = AudioManager.GetMusicVolume() * 100;
     sliderSFXVolume.value   = AudioManager.GetSFXVolume() * 100;
 }
        public void _PauseGame()
        {
            Debug.Log("_PauseGame");
            CameraControl.FadeBlur(uiBlurEffect, 0, 2);
            CameraControl.TurnBlurOn();
            GameControl.PauseGame();
            UIPauseMenu.Show();

            //Time.timeScale=0;
        }
        IEnumerator _ResumeGame()
        {
            Debug.Log("_ResumeGame");
            CameraControl.FadeBlur(uiBlurEffect, 2, 0);
            CameraControl.TurnBlurOff();
            GameControl.ResumeGame();
            UIPauseMenu.Hide();

            yield return(StartCoroutine(WaitForRealSeconds(0.25f)));
            //Time.timeScale=1;
        }
Exemple #5
0
        public void Awake()
        {
            instance    = this;
            thisObj     = gameObject;
            rectT       = thisObj.GetComponent <RectTransform>();
            canvasGroup = thisObj.GetComponent <CanvasGroup>();
            if (canvasGroup == null)
            {
                canvasGroup = thisObj.AddComponent <CanvasGroup>();
            }

            canvasGroup.alpha = 0;
            //thisObj.SetActive(false);
            rectT.anchoredPosition = new Vector3(0, 99999, 0);
        }