debug screen to show loaded objects, fixed particles not getting properly cleaned, canvas cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user