Point lights
This commit is contained in:
@@ -6,11 +6,12 @@ void HydraSystem::Update(float delta_t_seconds)
|
||||
UpdateSystem(delta_t_seconds);
|
||||
|
||||
}
|
||||
|
||||
void HydraSystem::Shutdown()
|
||||
{
|
||||
for(HydraID entity_id : Entities)
|
||||
{
|
||||
DestroyComponents(entity_id);
|
||||
DestroyComponent(entity_id);
|
||||
}
|
||||
FreeSystemResources();
|
||||
}
|
||||
@@ -23,13 +24,20 @@ void HydraSystem::InitialiseComponents()
|
||||
}
|
||||
EntitiesToCreate.clear();
|
||||
}
|
||||
|
||||
void HydraSystem::DestroyComponents(HydraID actor_id)
|
||||
void HydraSystem::DeleteComponents()
|
||||
{
|
||||
auto it = std::find(Entities.begin(), Entities.end(), actor_id);
|
||||
if(it == Entities.end())
|
||||
for(auto it = EntitiesToDelete.begin(); it != EntitiesToDelete.end(); ++it)
|
||||
{
|
||||
return;
|
||||
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);
|
||||
}
|
||||
DestroyComponent(actor_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user