public void OpenWin(UIPanelType type, Vector3 pos, bool closeOther = false) { BasePanel panel = UIPanelRegister.GetPanel(type); if (panelStack.Count != 0) { BasePanel top = null; if (closeOther) { top = panelStack.Pop(); } else { top = panelStack.Peek(); } if (null != top) { top.OnExit(); } } panel.transform.localPosition = pos; panel.OnEnter(); panelStack.Push(panel); }
public void OpenWin(UIPanelType type, bool closeOther) { BasePanel target = UIPanelRegister.GetPanel(type); OpenWin(target, Vector3.zero, closeOther); }