Ejemplo n.º 1
0
        internal override void OnRemove(MyActor owner)
        {
            if (m_mergeGroup != null)
            {
                m_mergeGroup.RemoveEntity(m_owner);

                m_mergeGroup = null;
            }

            if (m_parent != null)
            {
                // well, this if shouldn't be needed, but somehow it is
                if (m_parent.GetGroupRoot() != null)
                {
                    m_parent.GetGroupRoot().m_children.Remove(m_owner);
                }
                m_parent = null;
            }

            base.OnRemove(owner);

            this.Deallocate();
        }
Ejemplo n.º 2
0
        internal override void OnRemove(MyActor owner)
        {
            if (m_mergeGroup != null)
            {
                m_mergeGroup.RemoveEntity(m_owner);
                m_mergeGroup = null;
            }

            if (m_parent != null)
            {
                var root = m_parent.GetGroupRoot();
                if (root != null)
                {
                    root.Remove(this);
                }
                m_parent = null;
            }

            base.OnRemove(owner);

            this.Deallocate();
        }