private void PopUIForm() { if (stackCurrentUIForms.Count >= 2) { BaseUIForm topUIForm = stackCurrentUIForms.Pop(); topUIForm.Hiding(); BaseUIForm nextTopUIForm = stackCurrentUIForms.Peek(); nextTopUIForm.Display(); } else if (stackCurrentUIForms.Count == 1) { BaseUIForm topUIForm = stackCurrentUIForms.Pop(); topUIForm.Hiding(); } }
//PushUI入栈 private void PushUIFormToStack(string uiFormname) { BaseUIForm baseUIForm; if (stackCurrentUIForms != null && stackCurrentUIForms.Count > 0) { BaseUIForm topUIForm = stackCurrentUIForms.Peek(); topUIForm.Freeze(); } dicAllUIForms.TryGetValue(uiFormname, out baseUIForm); if (baseUIForm != null) { stackCurrentUIForms.Push(baseUIForm); baseUIForm.Display(); } else { Debug.LogWarning("Please Check UIFormname , UIForm is null"); } }