Exemplo n.º 1
0
        IEnumerator GameOverDelay(bool won)
        {
            yield return(StartCoroutine(WaitForRealSeconds(.1f)));

            CameraControl.FadeBlur(uiBlurEffect, 0, 2);
            CameraControl.TurnBlurOn();
            UIGameOver.Show(won);

            TDSTouchInput.Hide();
        }
Exemplo n.º 2
0
        public void _PauseGame()
        {
            CameraControl.FadeBlur(uiBlurEffect, 0, 2);
            CameraControl.TurnBlurOn();
            GameControl.PauseGame();                    //Telling GameControl to paause the game
            UIPauseMenu.Show();

            TDSTouchInput.Hide();

            Time.timeScale = 0;
        }
Exemplo n.º 3
0
        public void _TurnTabOff()
        {
            Time.timeScale = 1;
            Cursor.visible = false;

            isOn = false;

            TDSTouchInput.Show();

            GameControl.GetPlayer().EnableFire();
            tabObject.SetActive(false);
        }
Exemplo n.º 4
0
        public void _TurnTabOn()
        {
            Time.timeScale = 0;
            Cursor.visible = true;

            isOn = true;

            TDSTouchInput.Hide();

            GameControl.GetPlayer().DisableFire();
            UpdateTab();
            tabObject.SetActive(true);
        }
Exemplo n.º 5
0
        IEnumerator _ResumeGame()
        {
            CameraControl.FadeBlur(uiBlurEffect, 2, 0);
            CameraControl.TurnBlurOff();
            GameControl.ResumeGame();                   //Telling GameControl to resume the game
            UIPauseMenu.Hide();

            TDSTouchInput.Show();

            yield return(StartCoroutine(WaitForRealSeconds(0.25f)));

            Time.timeScale = 1;
        }
Exemplo n.º 6
0
        void Awake()
        {
            instance    = this;
            thisObj     = gameObject;
            rectT       = thisObj.GetComponent <RectTransform>();
            canvasGroup = thisObj.GetComponent <CanvasGroup>();
            if (canvasGroup == null)
            {
                canvasGroup = thisObj.AddComponent <CanvasGroup>();
            }

            rectT.localPosition = Vector3.zero;
        }