debug screen to show loaded objects, fixed particles not getting properly cleaned, canvas cleanup

This commit is contained in:
lustlion
2022-02-23 16:46:03 +01:00
parent a4490bc827
commit 00cec59351
5 changed files with 27 additions and 53 deletions

View File

@@ -54,19 +54,19 @@ LoadedObjects.Particles = {}
end
function Particle:Kill()
if self.light ~= nil then
KillLight(self.light)
end
if self.id ~= nil then
for _, e in pairs(LoadedParticles) do
if e.id > self.id then
e.id = e.id - 1
end
end
table.remove(LoadedParticles,self.id)
end
self = nil
end
if self.light ~= nil then
self.light:Kill()
end
if self.id ~= nil then
for _, e in pairs(LoadedObjects.Particles) do
if e.id > self.id then
e.id = e.id - 1
end
end
table.remove(LoadedObjects.Particles,self.id)
end
self = nil
end
function Particle:HandleAnimation()
self.timer = self.timer + current_dt