public UIInfoData(EnumUIType _uiType, string _path, params object[] _uiParams) { UIType = _uiType; Path = _path; UIparams = _uiParams; ScriptType = UIPathDefines.GetUIScriptByType(UIType); }
public void OpenUI(bool _isCloseOthers, EnumUIType[] _uiTypes, params object[] _uiParams) { //关闭其他ui if (_isCloseOthers) { CloseUIAll(); } //要打开的ui 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()); } }
public void PreLoadUI(EnumUIType _uiType) { string path = UIPathDefines.GetPrefabsPathByType(_uiType); Resources.Load(path); }