コード例 #1
0
 public void CloseWindow(UIBaseWindow window)
 {
     if (window != null)
     {
         //unbind Msgs
         window.OnClose();
         _eventRegisterService.UnRegisterEvent(window);
         if (_windowPool.ContainsKey(window.ResPath))
         {
             GameObject.Destroy(window.gameObject);
         }
         else
         {
             window.gameObject.SetActive(false);
             _windowPool[window.ResPath] = window;
         }
     }
 }
コード例 #2
0
        // Token: 0x060000A0 RID: 160 RVA: 0x00005928 File Offset: 0x00003B28
        public void CloseWindow(UIBaseWindow window)
        {
            bool flag = window != null;

            if (flag)
            {
                window.OnClose();
                this.openedWindows.Remove(window);
                this._eventRegisterService.UnRegisterEvent(window);
                bool flag2 = this._windowPool.ContainsKey(window.ResPath);
                if (flag2)
                {
                    Object.Destroy(window.gameObject);
                }
                else
                {
                    window.gameObject.SetActive(false);
                    this._windowPool[window.ResPath] = window;
                }
            }
        }