コード例 #1
0
ファイル: UIManger.cs プロジェクト: TonyChenn/NextFramework
        private void CleanAllWndSync()
        {
            for (int i = 0, iMax = mCurShowUIIDList.Count; i < iMax; ++i)
            {
                UIType    hideID  = mCurShowUIIDList[i];
                UIWndBase hideWnd = GetUIWnd(hideID);
                if (hideWnd != null)
                {
                    hideWnd.OnHideWnd();
                    hideWnd.SetActiveByRoot(false);
                }
            }

            mCurShowUIIDList.Clear();
            mCurCacheUIIDList.Clear();
            var ie1 = m_mapAllUIWnd.GetEnumerator();

            while (ie1.MoveNext())
            {
                GameObject.Destroy(ie1.Current.Value.CachedGameObject);
            }

            m_mapAllUIWnd.Clear();

            // 释放所有UI资源
            for (int i = 0; i < mAssetList.Count; i++)
            {
                mAssetList[i].Destory();
            }

            mAssetList.Clear();

            //AppInterface.GUIModule.DestoryPlayerManagerGameObject();
            //AppInterface.GUIModule.DestroyBillboardUI();
        }
コード例 #2
0
ファイル: UIManger.cs プロジェクト: TonyChenn/NextFramework
        void HideWndSync(UIType[] arHideID)
        {
            if (arHideID != null)
            {
                for (int i = 0, hideLength = arHideID.Length; i < hideLength; ++i)
                {
                    UIType hideID = arHideID[i];
                    if (IsUIShowing(hideID))
                    {
                        mCurShowUIIDList.Remove(hideID);

                        UIWndBase hideWnd = GetUIWnd(hideID);
                        if (hideWnd != null)
                        {
                            hideWnd.OnHideWnd();
                            //hideWnd.SetActiveByRoot(false);
                            DestroyWndSync(hideID);
                        }
                    }
                }
            }
        }