Sdk: Add automatic system update

Former-commit-id: ce129cc945e7373ac5b9f48960894712d66b097a
This commit is contained in:
Lynix
2015-06-22 00:58:46 +02:00
parent 4b5c08e739
commit 90363406a6
12 changed files with 101 additions and 58 deletions

View File

@@ -130,6 +130,15 @@ namespace Ndk
RemoveSystem(index);
}
inline void World::Update(float elapsedTime)
{
Update(); //< Update entities
// And then update systems
for (auto& systemPtr : m_systems)
systemPtr->Update(elapsedTime);
}
inline void World::Invalidate()
{
m_dirtyEntities.Resize(m_entities.size(), false);