示例#1
0
        private void _Close(int _uiType)
        {
            if (_uiType == -1)
            {
                foreach (int uiType in _openedUIs.Keys)
                {
                    _waitCloseUIs.Add(_uiType);
                }
            }

            SubUI subUi = null;

            if (_openedUIs.TryGetValue(_uiType, out subUi))
            {
                _openedUIs.Remove(_uiType);
                if (!subUi.OnHide())
                {
                    subUi.CachedGameObject.SetActive(false);
                }
            }
            else
            {
                _openedUIs.Remove(_uiType);
                UnityEngine.Object.Destroy(subUi.gameObject);
            }
        }
示例#2
0
 public void AddSubUI(int index, SubUI subUi)
 {
     _SubUis[index] = subUi;
 }