void Init() { activeGroup = menuGroup; menuGroup.FadeInstant(true); optionsGroup.FadeInstant(false); controlsGroup.FadeInstant(false); }
IEnumerator MoveToGroup(FadeCanvasGroup group) { if (group == activeGroup) { yield break; } activeGroup.FadeOut(); yield return(new WaitForSeconds(activeGroup.fadeDuration)); group.FadeIn(); yield return(new WaitForSeconds(group.fadeDuration)); activeGroup = group; }
protected void Awake() { m_FadeCanvasGroup = GetComponent <FadeCanvasGroup>(); Debug.Assert(m_FadeCanvasGroup != null); }