public virtual void OnToBePoppedToTop(string prevTopName) { if (stackedTransition != null) { IsInTransition = true; stackedTransition.Play(forward: false); } }
public virtual void LoadUI(Dictionary <string, string> propertyList = null) { UIElementBase[] componentsInChildren = base.gameObject.GetComponentsInChildren <UIElementBase>(); UIElementBase[] array = componentsInChildren; foreach (UIElementBase uIElementBase in array) { uIElementBase.Controller = this; if (uIElementBase.name != "") { Elements[uIElementBase.name] = uIElementBase; } } array = componentsInChildren; foreach (UIElementBase uIElementBase in array) { uIElementBase.Init(propertyList); } IsLoaded = true; screenTransition = FindElement("TransitionInOut", warnIfMissing: false) as IScreenTransition; stackedTransition = FindElement("TransitionPushPop", warnIfMissing: false) as IScreenTransition; if (screenTransition != null) { IsInTransition = true; screenTransition.Play(); } if ((bool)UIManager.Instance) { UIManager.Instance.ControlLoaded(this); } else { Logger.LogFatal(this, "UIManager must exist in this scene"); } }
public virtual void CloseScreen() { if (screenTransition != null) { IsInTransition = true; screenTransition.Play(forward: false, "OnTransitionOutEnd"); UIManager.Instance.ScreenWillBePopped(this); } else { RemoveUI(); } }