예제 #1
0
        /// <summary>销毁</summary>
        public virtual void Dispose()
        {
            mIsStateActived = false;

            IState state = default;
            int    max   = mSubStateList.Size;
            var    list  = mSubStateList.Keys;

            for (int i = 0; i < max; i++)
            {
                state = mSubStateList.GetValue(list[i]);
#if ILRUNTIME
                state?.Dispose();
#else
                Utils.Reclaim(state);
#endif
            }

#if ILRUNTIME
            mSubStateList?.Clear();
            mSubStateList = default;
#else
            Utils.Reclaim(mSubStateList);
#endif

            mIsInited           = false;
            mSubState           = default;
            mSubStateList       = default;
            mFSM                = default;
            mFSMName            = int.MaxValue;
            mChangingState      = default;
            mChangingStateParam = default;
            mSelfParam          = default;
        }
예제 #2
0
        public void Dispose()
        {
            ClearResult();
            Purge();

            mAllResult?.Clear();
            mAllResult = default;
        }
예제 #3
0
        private void OnDestroy()
        {
            mGridCompMapper?.Clear();

            ElimlnateCore.Instance.Clean();

            OnInitUIGridOperateLayout = default;
            mInputCore = default;
            mCore      = default;
        }
예제 #4
0
        /// <summary>
        /// 销毁对象池
        /// </summary>
        private void DestroyPool <T>(ref KeyValueList <int, Stack <T> > pool)
        {
            Stack <T> list;
            int       max = pool.Keys.Count;

            for (int i = 0; i < max; i++)
            {
                int key = pool.Keys[i];
                list = pool[key];
                Utils.Reclaim(ref list, true, true);
            }
            pool.Clear();
        }
예제 #5
0
        public virtual void Clear()
        {
            List <IGridEffectInfo> list = mMapper.Values;
            int max = list.Count;

            for (int i = 0; i < max; i++)
            {
                list[i].GetParam().Curve = default;
                list[i].Clean();
            }
            mMapper.Clear();
            mMapper.TrimExcess();
        }
예제 #6
0
        public void Dispose()
        {
            Loaded = 0;
            Utils.Reclaim(mLoader);

            ResList.Clear();
            mDepsSigned?.Clear();

            CompleteEvent?.RemoveAllListeners();
            RemoteAssetUpdated?.RemoveAllListeners();

            CompleteEvent      = default;
            RemoteAssetUpdated = default;
            mLoader            = default;
            mDepsSigned        = default;
        }
예제 #7
0
        /// <summary>销毁</summary>
        public virtual void Dispose()
        {
            StopStateMachine();

            if (mStateList != null)
            {
                int max = mStateList.Count;
#if ILRUNTIME
                FState state;
#endif
                for (var i = 0; i < max; i++)
                {
#if ILRUNTIME
                    state = mStateList[i] as FState;
                    state.Dispose();
#else
                    Utils.Reclaim(mStateList[i]);
#endif
                }
            }
            else
            {
            }

#if ILRUNTIME
            mStates?.Clear();
            mStateList?.Clear();

            mStates    = default;
            mStateList = default;
#else
            Utils.Reclaim(ref mStates, true);
            Utils.Reclaim(ref mStateList, true);
#endif

            mNext           = default;
            Current         = default;
            mPrevious       = default;
            mStateParam     = default;
            mChangingState  = default;
            FSMFrameUpdater = default;
            FSMRegister     = default;
            OnFSMChanged    = default;
        }
예제 #8
0
        public void Clean()
        {
            Array.Clear(mGrids, 0, mGrids.Length);
            Array.Clear(mTileItems, 0, mTileItems.Length);

            int max    = mGridMapper.Count;
            var enumer = mGridMapper.GetEnumerator();

            for (int i = 0; i < max; i++)
            {
                enumer.MoveNext();
                enumer.Current.Value.Dispose();
            }
            mGridMapper?.Clear();
            mGridsGraphic?.Clear();

            OnRearrangerGrids   = default;
            AfterGridsDeactived = default;
        }
예제 #9
0
        public void Clean()
        {
            mActivedEffectMapper?.Clear();
            mActivedEffectMapper = default;

            if (HasAniStateEffect())
            {
                int max = m_AniStateEffects.Length;
                for (int i = 0; i < max; i++)
                {
                    m_AniStateEffects[i].Release();
                }
                m_AniStateEffects = default;
            }
            else
            {
            }

            ReleaseNotice();
        }
예제 #10
0
        public void Clean()
        {
            MethodUpdater updater;
            int           max = mUpdaterMapper.Size;

            for (int i = 0; i < max; i++)
            {
                updater = mUpdaterMapper.GetValueByIndex(i);
                UpdaterNotice.RemoveSceneUpdater(updater);
                updater.Dispose();
            }
            max = mUpdaterMapper.Size;
            for (int i = 0; i < max; i++)
            {
                updater = mLateUpdaterMapper.GetValueByIndex(i);
                UpdaterNotice.RemoveSceneUpdater(updater);
                updater.Dispose();
            }
            mUpdaterMapper?.Clear();
            mLateUpdaterMapper?.Clear();
        }
예제 #11
0
 public virtual void Clean()
 {
     mHttpReqeuesters?.Clear();
 }
예제 #12
0
        public override void Clear()
        {
            base.Clear();

            mEndDistance?.Clear();
        }
예제 #13
0
 public void Clear()
 {
     Nodes       = default;
     mResPooling = default;
     mSceneNodesCache.Clear();
 }
예제 #14
0
        protected override void Purge()
        {
            base.Purge();

            mRangeSigns?.Clear();
        }
예제 #15
0
 public void ClearResult()
 {
     EliminateCount = 0;
     mAllResult.Clear();
     FirstGridShapeIndex = int.MaxValue;
 }
예제 #16
0
 public void Clear(bool isTrimExcess = false)
 {
     mFieldMapper?.Clear(isTrimExcess);
 }