示例#1
0
        /// <summary>
        /// Opens the U.
        /// </summary>
        /// <param name="_isCloseOthers">If set to <c>true</c> _is close others.</param>
        /// <param name="_uiTypes">_ui types.</param>
        /// <param name="_uiParams">_ui parameters.,第一个参数必定要是UI位置有关的参数,而且必须是X轴方向</param>
        private void OpenUI(bool _isCloseOthers, EnumUIType[] _uiTypes, params object[] _uiParams)
        {
            // Close Others UI.
            if (_isCloseOthers)
            {
                CloseUIAll();
            }

            // push _uiTypes in Stack.
            for (int i = 0; i < _uiTypes.Length; i++)
            {
                EnumUIType _uiType = _uiTypes[i];
                if (!dicOpenUIs.ContainsKey(_uiType))
                {
                    string _path = UIPathDefines.GetPrefabPathByType(_uiType);
                    stackOpenUIs.Push(new UIInfoData(_uiType, _path, _uiParams));
                }
            }

            // Open UI.
            if (stackOpenUIs.Count > 0)
            {
                CoroutineController.Instance.StartCoroutine(AsyncLoadData());
            }
        }
示例#2
0
 public UIInfoData(EnumUIType _uiType, string _path, params object[] _uIparams)
 {
     UIType          = _uiType;
     Path            = _path;
     UIparams        = _uIparams;
     this.ScriptType = UIPathDefines.GetUIScriptByType(this.UIType);
 }
示例#3
0
        /// <summary>
        /// Preloads the U.
        /// </summary>
        /// <param name="_uiType">_ui type.</param>
        public void PreloadUI(EnumUIType _uiType)
        {
            string path = UIPathDefines.GetPrefabPathByType(_uiType);

            Resources.Load(path);
            //ResManager.Instance.ResourcesLoad(path);
        }
示例#4
0
        public void PreloadUI(EnumUIType _uiType)
        {
            string path = UIPathDefines.GetPrefabsPathByType(_uiType);

            Resources.Load(path);
        }