Exemplo n.º 1
0
        /// <summary>
        /// 根据类型关闭一个ui
        /// </summary>
        public void CloseUI <T>(bool isPlayAnim = true, UICallBack callback = null, params object[] objs)
            where T : CUIWindowBase
        {
            string        winName = typeof(T).Name;
            CUIWindowBase window  = CUIManagerHelper.GetUIFromCache(winName, ActiveDict);

            if (window == null)
            {
                Debug.LogError("CloseUIWindow Error UI ->" + winName + "<-  not Exist!");
                return;
            }

            CloseUI(window, isPlayAnim, callback, objs);
        }
Exemplo n.º 2
0
        public void OpenUI <T>(UICallBack callback = null, params object[] objs) where T : CUIWindowBase
        {
            string        winName = typeof(T).Name;
            CUIWindowBase window  = CUIManagerHelper.GetUIFromCache(winName, HiddenDict);

            if (window == null)
            {
                CreateUI <T>(go =>
                {
                    window = go.GetComponent <T>();
                    InternalOpenUI(window, callback, objs);
                });
                return;
            }

            InternalOpenUI(window, callback, objs);
        }
Exemplo n.º 3
0
        public CUIWindowBase HideUI(string winName)
        {
            CUIWindowBase ui = CUIManagerHelper.GetUIFromCache(winName, ActiveDict);

            return(HideUI(ui));
        }
Exemplo n.º 4
0
        public CUIWindowBase ShowUI(string viewName)
        {
            CUIWindowBase ui = CUIManagerHelper.GetUIFromCache(viewName, ActiveDict);

            return(RevealUI(ui));
        }