(World) Replaced pointers to Entity by EntityHandle

Former-commit-id: b29aaaa7362c0c816dc270e15ba5f8253717c457
This commit is contained in:
Lynix
2015-02-19 23:51:17 +01:00
parent 924d10e61c
commit 6201183572
4 changed files with 10 additions and 10 deletions

View File

@@ -50,7 +50,7 @@ namespace Ndk
m_killedEntities.clear();
}
void World::KillEntity(Entity* entity)
void World::KillEntity(EntityHandle entity)
{
///DOC: Ignoré si l'entité est invalide
@@ -58,14 +58,14 @@ namespace Ndk
m_killedEntities.emplace_back(entity);
}
Entity* World::GetEntity(Entity::Id id)
EntityHandle World::GetEntity(Entity::Id id)
{
if (IsEntityIdValid(id))
return &m_entities[id];
return m_entities[id].CreateHandle();
else
{
NazaraError("Invalid ID");
return nullptr;
return EntityHandle();
}
}