void ComponentFactory::AttachComponent(Entity* _entity, natU32 _type) { componentFactory_t::iterator it = m_componentFactory.find(_type); assert(it != m_componentFactory.end()); Component* component = it->second; // add component to type component->Clone(_entity, 0); }
Component::Component(const Component& other) { other.Clone(this, nullptr); }