Merge pull request #141 from SHADE-DP/SP3-5-ECS

SP3-5 ECS
Bugfix: Added remove component broadcast to removeComponentOfEntity
This commit is contained in:
XiaoQiDigipen 2022-10-31 17:32:42 +08:00 committed by GitHub
commit 0957c39283
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -40,6 +40,12 @@ namespace SHADE
{
comp->OnDestroy();
}
SHComponentRemovedEvent eventData;
eventData.eid = entityID;
eventData.removedComponentType = i;
SHEventManager::BroadcastEvent<SHComponentRemovedEvent>(eventData, SH_COMPONENT_REMOVED_EVENT);
}
@ -53,6 +59,7 @@ namespace SHADE
//entityHandle.RemoveHandle(entityID);
}