fix: make sure that some variable doesn't leak to the global namespace
This commit is contained in:
parent
c9475e742c
commit
42e6875547
1 changed files with 3 additions and 1 deletions
|
@ -7,7 +7,7 @@ function Parent:new(world, type, x, y, z, w, h, d, isSolid)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Parent:draw()
|
function Parent:draw()
|
||||||
drawx, drawy, drawz = self.x, self.y, self.z
|
local drawx, drawy, drawz = self.x, self.y, self.z
|
||||||
if (self.world.maptype == "shoot") then
|
if (self.world.maptype == "shoot") then
|
||||||
drawx = drawx + math.floor(drawy/2)
|
drawx = drawx + math.floor(drawy/2)
|
||||||
end
|
end
|
||||||
|
@ -22,6 +22,8 @@ function Parent:draw()
|
||||||
end
|
end
|
||||||
|
|
||||||
function Parent:drawShadow(x, y)
|
function Parent:drawShadow(x, y)
|
||||||
|
local x = x or 0
|
||||||
|
local y = y or 0
|
||||||
if (self.world.maptype == "shoot") then
|
if (self.world.maptype == "shoot") then
|
||||||
x = x + math.floor(y/2)
|
x = x + math.floor(y/2)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue