Exemplo n.º 1
0
        public override void Remove()
        {
            base.Remove();

            mapEntityList.Remove(this);

#if CLIENT
            if (SelectedList.Contains(this))
            {
                SelectedList = SelectedList.Where(e => e != this).ToHashSet();
            }
#endif

            if (aiTarget != null)
            {
                aiTarget.Remove();
                aiTarget = null;
            }

            if (linkedTo != null)
            {
                for (int i = linkedTo.Count - 1; i >= 0; i--)
                {
                    linkedTo[i].RemoveLinked(this);
                }
                linkedTo.Clear();
            }
        }