Collisionfilters

This commit is contained in:
ViktorLjung
2014-05-22 22:05:06 +02:00
parent 6137adf604
commit a674295a83
11 changed files with 218 additions and 32 deletions
+7 -7
View File
@@ -83,12 +83,6 @@ void World::RemoveEntity(EntityID entity)
m_EntitiesToRemove.push_back(pair.first);
}
}
// Trigger events
for (auto pair : m_Systems)
{
auto system = pair.second;
system->OnEntityRemoved(entity);
}
}
void World::ProcessEntityRemovals()
@@ -111,8 +105,14 @@ void World::ProcessEntityRemovals()
m_ComponentsOfType[type].remove(component);
}
m_EntityComponents.erase(entity);
RecycleEntityID(entity);
// Trigger events
for (auto pair : m_Systems)
{
auto system = pair.second;
system->OnEntityRemoved(entity);
}
}
m_EntitiesToRemove.clear();
}