Added Entityx logic (Movement|Render|Destruct)
This commit is contained in:
19
src/entities/DestructSystem.cpp
Normal file
19
src/entities/DestructSystem.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user