#include "HydraSystem.h" void HydraSystem::Update(float delta_t_seconds) { UpdateSystem(delta_t_seconds); } void HydraSystem::Shutdown() { for(HydraID entity_id : Entities) { DestroyComponent(entity_id); } FreeSystemResources(); } void HydraSystem::InitialiseComponents() { for(auto it = EntitiesToCreate.begin(); it != EntitiesToCreate.end(); ++it) { HydraID actor_id = *it; InitialiseComponent(actor_id); } EntitiesToCreate.clear(); } void HydraSystem::DeleteComponents() { for(auto it = EntitiesToDelete.begin(); it != EntitiesToDelete.end(); ++it) { HydraID actor_id = *it; DestroyComponent(actor_id); } EntitiesToDelete.clear(); } void HydraSystem::DeleteComponent(HydraID actor_id) { if(std::find(Entities.begin(), Entities.end(), actor_id)!= Entities.end()) { DestroyComponent(actor_id); } }