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

Sp3 5 ecs
Added event manager include for added/removedComponentEvent
This commit is contained in:
XiaoQiDigipen 2022-09-30 20:36:02 +08:00 committed by GitHub
commit e046dafced
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@
#include "../Events/SHComponentRemovedEvent.h"
//#include "Scene/SHSceneNode.h"
#include "SH_API.h"
#include "Events/SHEventManager.hpp"
#include <cassert>
@ -330,7 +331,7 @@ namespace SHADE
SHComponentRemovedEvent eventData;
eventData.eid = entityID;
eventData.addedComponentType = ComponentFamily::GetID<T>();
eventData.removedComponentType = ComponentFamily::GetID<T>();
SHEventManager::BroadcastEvent<SHComponentRemovedEvent>(eventData, SH_COMPONENT_REMOVED_EVENT);
}