Files
DarkRP2D/src/entities/DestructSystem.cpp

20 lines
665 B
C++

#include "DestructSystem.h"
#include "components/Texture.h"
#include <iostream>
void DestructSystem::configure(entityx::EventManager &event_manager) {
event_manager.subscribe<entityx::EntityDestroyedEvent>(*this);
}
void DestructSystem::update(entityx::EntityManager &entities, entityx::EventManager &events, entityx::TimeDelta dt){}
void DestructSystem::receive(const entityx::EntityDestroyedEvent &destroyedEvent) {
/*entityx::ComponentHandle<Texture> texture = destroyedEvent.entity.component<Texture>();
if (texture) {
// Do stuff with texture
}*/
std::cout << "!!!!!!!!!!!!!!!!!!!Entity destroyed!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
}