Ndk/BaseSystem: Added entity validation

Former-commit-id: d82a66179244ae8807f65b193ed9be2f48abffa4
This commit is contained in:
Lynix
2015-05-03 19:51:56 +02:00
parent 3ebf967f30
commit 47c5d1072b
4 changed files with 31 additions and 9 deletions

View File

@@ -136,6 +136,14 @@ namespace Ndk
OnEntityRemoved(entity); // Et on appelle le callback
}
inline void BaseSystem::ValidateEntity(Entity* entity, bool justAdded)
{
NazaraAssert(entity, "Invalid entity");
NazaraAssert(HasEntity(entity), "Entity should be part of system");
OnEntityValidation(entity, justAdded);
}
inline void BaseSystem::SetWorld(World& world)
{
m_world = &world;