Exemplo n.º 1
0
        public void OpenUI(bool _isCloseOther, EnumUIType[] _uiTypes, params object[] _uiParams)
        {
            //do or not close other UI.
            if (_isCloseOther)
            {
                CloseUIAll();
            }
            //Push _uiTypes in stack.
            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));
                }
            }

            //Async Load UI.
            if (stackOpenUIs.Count > 0)
            {
                CoroutineController.Instance.StartCoroutine(AsyncLoadData());
            }
        }
Exemplo n.º 2
0
        public void PreloadUI(EnumUIType _uiType)
        {
            string path = UIPathDefines.GetPrefabsPathByType(_uiType);

            Resources.Load(path);
        }