/// <summary> /// 界面入栈 /// </summary> /// <param name="name"></param> public void PushUIStack(string uiname) { if (UIStack.Count > 0) { //返回栈顶的界面,且不移除 IUIBase old_Pop = UIStack.Peek(); //保留之前的界面 old_Pop.OnPausing(); } //创建界面 IUIBase new_Pop = GetCurrentUI(uiname); //界面进栈顶部 UIStack.Push(new_Pop); //进入当前界面 new_Pop.OnEntering(); }