Exemplo n.º 1
0
        public void CloseUI(string _uiName, CloseType closeType = CloseType.DESTORY)
        {
            UIOpenInfo info = UIOpenList_Find(_uiName);

            if (info != null)
            {
                //把关闭的UI面板从链表里移除
                //UIOpenList_Delete(info.UIName);

                switch (closeType)
                {
                case CloseType.DESTORY:
                    //把关闭的UI面板从链表里移除
                    UIOpenList_Delete(info.UIName);
                    _UIManager.CloseUI(info.UIName);
                    break;

                case CloseType.HIDE:
                    _UIManager.HideUI(info);
                    break;
                }
                UIPanelDepthOrder.CloseChildPanelDep(info);
            }
            else
            {
                Debug.Log(" #[UICtrl-UIClose]# 该面板不存在 = " + _uiName);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// UI创建成功回调
 /// </summary>
 public void C2CUIOpenCreatSucc(UIOpenInfo data)
 {
     if (data != null)
     {
         //当前UI面板添加进链表
         UIOpenList_Add(data);
         if (data.UIObj != null)
         {
             //进行深度排序
             UIPanelDepthOrder.OpenChildPanelDep(data);
         }
     }
     else
     {
         Debug.LogError(" #[UICtrl-C2CUIOpenCreatSucc]# 传递参数为空");
     }
 }