Beispiel #1
0
        static void AddUI(UIWindowBase UI)
        {
            if (!showUIList.ContainsKey(UI.name))
            {
                showUIList.Add(UI.name, new List <UIWindowBase>());
            }

            showUIList[UI.name].Add(UI);

            UI.Show();
        }
Beispiel #2
0
        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);
        }