Ejemplo n.º 1
0
        public override void Release()
        {
            if (ObserversList != null)
            {
                ObserversList.Clear();
            }
            ObserversList = null;

            VisiblePlayers = null;
            VisibleNpcs    = null;
            VisibleItems   = null;
            VisibleGathers = null;

            if (Ai != null)
            {
                Ai.Release();
            }
            Ai = null;

            if (_lifeStats != null)
            {
                _lifeStats.Release();
            }
            _lifeStats = null;

            GameStats = null;

            Position  = null;
            BindPoint = null;
            Instance  = null;

            Target = null;

            if (VisualEffect != null)
            {
                VisualEffect.Release();
            }
            VisualEffect = null;

            if (Effects != null)
            {
                for (int i = 0; i < Effects.Count; i++)
                {
                    Effects[i].Release();
                }
            }
            Effects     = null;
            EffectsLock = null;

            base.Release();
        }
Ejemplo n.º 2
0
        public override void Release()
        {
            if (ObserversList != null)
            {
                ObserversList.Clear();
            }
            ObserversList = null;

            VisiblePlayers = null;
            VisibleNpcs    = null;
            VisibleItems   = null;

            if (Ai != null)
            {
                Ai.Release();
            }
            Ai = null;

            if (_lifeStats != null)
            {
                _lifeStats.Release();
            }
            _lifeStats = null;

            GameStats = null;

            Position  = null;
            BindPoint = null;
            Instance  = null;

            Target = null;

            EffectsLock = null;

            base.Release();
        }