public virtual void ChangeOwner(CEntity newOwner) { Debug.Assert(m_owner != null); m_owner.UnregisterComponent(this); newOwner.RegisterComponent(this); m_owner = newOwner; }
internal void RegisterComponent(CEntity owner) { m_owner = owner; m_owner.RegisterComponent(this); Name = GetComponentName(this); Id = m_owner.ComponentCounter; if (ComponentGuid == Guid.Empty) { ComponentGuid = Guid.NewGuid(); } }