Exemplo n.º 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.</param>
        private void OpenUI(bool _isCloseOthers, EnumUIType[] _uiTypes, GameObject _uiParent = null, 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, _uiParent, _uiParams));
                }
            }

            // Open UI.
            if (stackOpenUIs.Count > 0)
            {
                CoroutineController.Instance.StartCoroutine(AsyncLoadData());
            }
        }
Exemplo n.º 2
0
 public UIInfoData(EnumUIType _uiType, string _path, GameObject _parent, params object[] _uiParams)
 {
     this.UIType     = _uiType;
     this.Path       = _path;
     this.Parent     = _parent;
     this.UIParams   = _uiParams;
     this.ScriptType = UIPathDefines.GetUIScriptByType(this.UIType);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Preloads the U.
 /// </summary>
 /// <param name="_uiType">_ui type.</param>
 public void PreloadUI(EnumUIType _uiType)
 {
     string path = UIPathDefines.GetPrefabPathByType(_uiType);
     //ResManager.Instance.ResourcesLoad(path);
 }