Added Entityx logic (Movement|Render|Destruct)

This commit is contained in:
Gulum
2017-11-01 13:30:08 +01:00
parent 70857cb258
commit 6f68ac7db5
18 changed files with 163 additions and 17 deletions

View 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;
}