public override void OnSuspend() { GameStatesManager.OnBackKey = null; if (canvasGroup != null) { FadeOut(); } else { GuiMain.SetActive(false); } }
protected virtual void FadeIn() { GuiMain.SetActive(true); MyCanvasGroup.interactable = false; // scale effect GuiMain.transform.localScale = ScaleStart; iTween.ScaleTo(GuiMain, Vector3.one, TimeIn); // alpha effect MyCanvasGroup.alpha = 1; MyCanvasGroup.interactable = true; FadeInFinish(); }
protected virtual void FadeOutFinish() { GuiMain.SetActive(false); }