Ejemplo n.º 1
0
 public void OpenUI(bool isCloseOther, EnumUIType[] uiTypes, params object[] uiParams)
 {
     //关闭其他UI
     if (isCloseOther)
     {
         CloseUIAll();
     }
     //push uiType to stackOpenUIs
     for (int i = 0; i < uiTypes.Length; i++)
     {
         EnumUIType uiType = uiTypes[i];
         if (!dicOpenUIs.ContainsKey(uiType))
         {
             string path = UIPathDefines.GetPrefabsPathByType(uiType);
             stackOpenUIs.Push(new UIInfoData(uiType, path, uiParams));
         }
     }
     //打开UI
     if (stackOpenUIs.Count > 0)
     {
         CoroutineController.Instance.StartCoroutine(asyncLoadData());
     }
 }
Ejemplo n.º 2
0
        public void PreLoadUI(EnumUIType uitype)
        {
            string path = UIPathDefines.GetPrefabsPathByType(uitype);

            Resources.Load(path);
        }