Moved world definition to Schema/Entities/Test.xml and removed HardcodedTestWorld

This commit is contained in:
sippeangelo
2015-12-09 14:25:41 +01:00
parent 3085ccdfbf
commit 58d827f7d0
9 changed files with 105 additions and 88 deletions
+3 -2
View File
@@ -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()