Exemple #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;
        }
        public void Dispose()
        {
            ClearResult();
            Purge();

            mAllResult?.Clear();
            mAllResult = default;
        }
        private void OnDestroy()
        {
            mGridCompMapper?.Clear();

            ElimlnateCore.Instance.Clean();

            OnInitUIGridOperateLayout = default;
            mInputCore = default;
            mCore      = default;
        }
Exemple #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();
        }
Exemple #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();
        }
Exemple #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;
        }
Exemple #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;
        }
Exemple #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;
        }
        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();
        }
Exemple #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();
        }
Exemple #11
0
 public virtual void Clean()
 {
     mHttpReqeuesters?.Clear();
 }
        public override void Clear()
        {
            base.Clear();

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

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