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

@@ -75,23 +75,6 @@ function Entity:CollisionMove()
return r
end
function Entity:MoveX()
local r = false
if not self:isCollidingAt(self.pos.x + self.vel.x, self.pos.y, LoadedObjects.Collisions) then
self.pos.x = self.pos.x + self.vel.x
else
self.vel.x = 0
r = true
end
if not self:isCollidingAt(self.pos.x, self.pos.y + self.vel.y, LoadedObjects.Collisions) then
self.pos.y = self.pos.y + self.vel.y
else
self.vel.y = 0
r = true
end
return r
end
function Entity:LightAdjust(x,y)
if self.light ~= nil then
local x = x or 0
@@ -103,7 +86,7 @@ end
function Entity:Kill()
if self.light ~= nil then
KillLight(self.light)
self.light:Kill()
end
if self.id ~= nil then
for _, e in pairs(LoadedObjects.Entities) do