static void AddUI(UIWindowBase UI) { if (!showUIList.ContainsKey(UI.name)) { showUIList.Add(UI.name, new List <UIWindowBase>()); } showUIList[UI.name].Add(UI); UI.Show(); }
public static UIWindowBase ShowUI(UIWindowBase ui) { ui.windowStatus = UIWindowBase.WindowStatus.Open; UISystemEvent.Dispatch(ui, UIEvent.OnShow); //派发OnShow事件 try { ui.Show(); ui.OnShow(); } catch (Exception e) { Debug.LogError(ui.UIName + " OnShow Exception: " + e.ToString()); } return(ui); }