Beispiel #1
0
        private IEnumerator _excuteLoadUI(string _prefabPath)
        {
            // Load Resource
            UnityEngine.Object     _res    = Resources.Load(_prefabPath);
            UnityEngine.GameObject _entity = GameObject.Instantiate(_res) as GameObject;

            yield return(null);

            // 设置父对象
            _entity.transform.SetParent(m_UIRoot.transform, false);

            // 初始化Panel
            DUIPanel _panel = _entity.GetComponent <DUIPanel>();

            _panel.Init();

            AddPanel(_panel.getName(), _panel);

            DoAttackListener(_entity);

            // 隐藏UI
            Hide(_panel.getName());

            yield return(null);
        }
Beispiel #2
0
        public void SendUpdateCommand(string _panelName)
        {
            DUIPanel _panel = m_panelList.GetEntity(_panelName);

            if (_panel)
            {
                _panel.UpdateUI();
            }
        }
Beispiel #3
0
        public void Hide(string _panelName)
        {
            DUIPanel _panel = GetPanel(_panelName);

            if (_panel)
            {
                SendActionRequest(new UIActionRequest(_panel, Action_Request_Type.ACTION_HIDE));
            }
        }
Beispiel #4
0
 private void AddPanel(string _name, DUIPanel _panel)
 {
     m_panelList.AddEntity(_name, _panel);
 }