Ndk/Components: Added On[Attached|Detached] events
Former-commit-id: 46e5b5720a8496dfe536181918ae0a995e028fc1
This commit is contained in:
@@ -38,7 +38,15 @@ namespace Ndk
|
||||
|
||||
inline void BaseComponent::SetEntity(Entity* entity)
|
||||
{
|
||||
m_entity = entity;
|
||||
if (m_entity != entity)
|
||||
{
|
||||
if (m_entity)
|
||||
OnDetached();
|
||||
|
||||
m_entity = entity;
|
||||
if (m_entity)
|
||||
OnAttached();
|
||||
}
|
||||
}
|
||||
|
||||
inline bool BaseComponent::Initialize()
|
||||
|
||||
Reference in New Issue
Block a user