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; }
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; }
public void Awake() { instance = this; thisObj = gameObject; canvasGroup = thisObj.GetComponent <CanvasGroup>(); if (canvasGroup == null) { canvasGroup = thisObj.AddComponent <CanvasGroup>(); } canvasGroup.alpha = 0; thisObj.SetActive(false); thisObj.GetComponent <RectTransform>().anchoredPosition = new Vector3(0, 0, 0); }