Esempio n. 1
0
 public UIInfoData(EnumUIType uitype, string path, params object[] uiparams)
 {
     this.UIType   = uitype;
     this.Path     = path;
     this.UIparams = uiparams;
     this.Scripts  = UIPathDefines.GetScirptsByType(this.UIType);
 }
Esempio n. 2
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());
     }
 }
Esempio n. 3
0
        public void PreLoadUI(EnumUIType uitype)
        {
            string path = UIPathDefines.GetPrefabsPathByType(uitype);

            Resources.Load(path);
        }