Ejemplo n.º 1
0
 public static void OpenPopup(Define.PopupType type, System.Action callback = null)
 {
     if (instance == null)
     {
         return;
     }
     if (instance.popupDic.ContainsKey(type))
     {
         if (nowOpenPopup != Define.PopupType.None)
         {
             instance.JustClosePopup(nowOpenPopup, () =>
             {
                 instance.JustOpenPopup(type, () =>
                 {
                     if (callback != null)
                     {
                         callback();
                     }
                     openPopupStack.Push(type);
                     nowOpenPopup = type;
                 });
             });
         }
         else
         {
             instance.JustOpenPopup(type, () =>
             {
                 if (callback != null)
                 {
                     callback();
                 }
                 openPopupStack.Push(type);
                 nowOpenPopup = type;
             });
         }
     }
 }