Barebones entity component commit events

This commit is contained in:
2014-04-22 15:42:40 +02:00
parent b1edefcf26
commit 84d6911744
4 changed files with 18 additions and 0 deletions
+9
View File
@@ -148,6 +148,15 @@ std::shared_ptr<Component> World::AddComponent(EntityID entity, std::string comp
return AddComponent<Component>(entity, componentType);
}
void World::CommitEntity(EntityID entity)
{
for (auto pair : m_Systems)
{
auto system = pair.second;
system->OnEntityCommit(entity);
}
}
void World::AddSystem(std::string systemType)
{
m_Systems[systemType] = std::shared_ptr<System>(m_SystemFactory.Create(systemType));