Add generic handlers

Former-commit-id: 8fc343d3a056de8031cf453748b8801d50d3710e
This commit is contained in:
Lynix
2016-03-31 21:14:22 +02:00
parent a2f6e54104
commit a77ad42fcb
16 changed files with 542 additions and 423 deletions

View File

@@ -26,16 +26,16 @@ namespace Ndk
inline void EntityOwner::Reset(Entity* entity)
{
if (m_entity)
m_entity->Kill();
if (m_object)
m_object->Kill();
EntityHandle::Reset(entity);
}
inline void EntityOwner::Reset(EntityOwner&& handle)
{
Reset(handle.GetEntity());
handle.m_entity = nullptr;
Reset(handle.GetObject());
handle.m_object = nullptr;
}
inline EntityOwner& EntityOwner::operator=(Entity* entity)