Example #1
0
 public UIBase GetUI(UIBase.TypeOfUI type)
 {
     switch (type)
     {
     case UIBase.TypeOfUI.UI_RecruitAndUpgradeRoom:
         break;
     }
     return(null);
 }
Example #2
0
 public void ShowPopup(UIBase.TypeOfUI type)
 {
     switch (type)
     {
     case UIBase.TypeOfUI.UI_RecruitAndUpgradeRoom:
         if (UIRecruitAndUpgradeRoom.instance != null)
         {
             UIRecruitAndUpgradeRoom.instance.ShowUI();
             return;
         }
         break;
     }
     InitUI(type);
 }
Example #3
0
    public void InitUI(UIBase.TypeOfUI type)
    {
        UpdateContainer();
        UIBase popupNeed = uiList[type.ToString()];

        if (popupNeed == null)
        {
            return;
        }
        GameObject obj   = Instantiate(popupNeed.gameObject, container);
        UIBase     popup = obj.GetComponent <UIBase>();

        if (popup != null)
        {
            popup.ShowUI();
        }
    }