local DeathSystem = inherited("DeathSystem", SystemMap)

function DeathSystem:new()
	local ms = instance(self)
	return ms
end

function DeathSystem:dynamic_wants(ent)
	return ent.aspects.health and ent.health <= 0
end

function DeathSystem:ent_added(ent)
end

function DeathSystem:ent_removed(ent)
end

function DeathSystem:step()
	for ent, _ in pairs(self.ents) do
		if not ent.any_feedback then
			self.world:remove_ent(ent)
		end
	end
end

return DeathSystem