Ndk/Entity: Fix a stupid mistake
Former-commit-id: cecdd2a6134f24ea0598628863605d7897cbf922
This commit is contained in:
parent
261dffd931
commit
3e8d2e1e47
|
|
@ -56,7 +56,7 @@ namespace Ndk
|
||||||
for (unsigned int i = m_componentBits.FindFirst(); i != m_componentBits.npos; i = m_componentBits.FindNext(i))
|
for (unsigned int i = m_componentBits.FindFirst(); i != m_componentBits.npos; i = m_componentBits.FindNext(i))
|
||||||
{
|
{
|
||||||
if (i != index)
|
if (i != index)
|
||||||
m_components[index]->OnComponentAttached(component);
|
m_components[i]->OnComponentAttached(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
return component;
|
return component;
|
||||||
|
|
@ -100,7 +100,7 @@ namespace Ndk
|
||||||
for (unsigned int i = m_componentBits.FindFirst(); i != m_componentBits.npos; i = m_componentBits.FindNext(i))
|
for (unsigned int i = m_componentBits.FindFirst(); i != m_componentBits.npos; i = m_componentBits.FindNext(i))
|
||||||
{
|
{
|
||||||
if (i != index)
|
if (i != index)
|
||||||
m_components[index]->OnComponentDetached(component);
|
m_components[i]->OnComponentDetached(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
component.SetEntity(nullptr);
|
component.SetEntity(nullptr);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue