예제 #1
0
        /// <summary>
        /// 反初始化
        /// </summary>
        public override void Uninitialize()
        {
            if (_updateCheckers != null)
            {
                for(int i = 0; i < _updateCheckers.Count; i++)
                {
                    IFSUpdateChecker.Destory(_updateCheckers[i]);
                }
                _updateCheckers.Clear();
                _updateCheckers = null;
            }

            if (_sessionProcessors != null)
            {
                for (int i = 0; i < _sessionProcessors.Count; i++)
                {
                    IFSSessionProcessor.Destory(_sessionProcessors[i]);
                }
                _sessionProcessors.Clear();
                _sessionProcessors = null;
            }

            if (_localCheckers != null)
            {
                for (int i = 0; i < _localCheckers.Count; i++)
                {
                    IFSLocalChecker.Destory(_localCheckers[i]);
                }
                _localCheckers.Clear();
                _localCheckers = null;
            }
        }
예제 #2
0
        protected void LateUpdate()
        {
            //清理
            if (_updateCheckers != null)
            {
                for (int i = _updateCheckers.Count - 1; i >= 0; --i)
                {
                    if (_updateCheckers[i].IsDone)
                    {
                        IFSUpdateChecker.Destory(_updateCheckers[i]);
                        _updateCheckers.RemoveAt(i);
                    }
                }
            }
            //
            if (_sessionProcessors != null)
            {
                for (int i = _sessionProcessors.Count - 1; i >= 0; --i)
                {
                    if (_sessionProcessors[i].IsDone)
                    {
                        IFSSessionProcessor.Destory(_sessionProcessors[i]);
                        _sessionProcessors.RemoveAt(i);
                    }
                }
            }

            if (_localCheckers != null)
            {
                for (int i = _localCheckers.Count - 1; i >= 0; --i)
                {
                    if (_localCheckers[i].IsDone)
                    {
                        IFSLocalChecker.Destory(_localCheckers[i]);
                        _localCheckers.RemoveAt(i);
                    }
                }
            }
        }