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