Moved world definition to Schema/Entities/Test.xml and removed HardcodedTestWorld
This commit is contained in:
@@ -41,9 +41,10 @@ ComponentWrapper World::GetComponent(EntityID entity, std::string componentType)
|
||||
return pool->GetByEntity(entity);
|
||||
}
|
||||
|
||||
const ComponentPool& World::GetComponents(std::string componentType)
|
||||
const ComponentPool* World::GetComponents(std::string componentType)
|
||||
{
|
||||
return *m_ComponentPools.at(componentType);
|
||||
auto it = m_ComponentPools.find(componentType);
|
||||
return (it != m_ComponentPools.end()) ? it->second : nullptr;
|
||||
}
|
||||
|
||||
EntityID World::generateEntityID()
|
||||
|
||||
Reference in New Issue
Block a user