draw.lua and main.lua linting
This commit is contained in:
parent
9f71874272
commit
03e5ce69cf
|
@ -71,7 +71,7 @@ world:addEntity(floor)
|
||||||
local scenarios = {
|
local scenarios = {
|
||||||
default = function()
|
default = function()
|
||||||
world:addEntity(Cart.new())
|
world:addEntity(Cart.new())
|
||||||
end ,
|
end,
|
||||||
manyCollectables = function()
|
manyCollectables = function()
|
||||||
local cart = Cart.new()
|
local cart = Cart.new()
|
||||||
cart.velocity.x = 0
|
cart.velocity.x = 0
|
||||||
|
|
|
@ -8,16 +8,12 @@ drawRectanglesSystem = filteredSystem(
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
drawSpriteSystem = filteredSystem(
|
drawSpriteSystem = filteredSystem("drawSprites", { position = T.XyPair, drawAsSprite = T.pd_image }, function(e)
|
||||||
"drawSprites",
|
if e.position.y < Camera.pan.y - 240 or e.position.y > Camera.pan.y + 480 then
|
||||||
{ position = T.XyPair, drawAsSprite = T.pd_image },
|
return
|
||||||
function(e)
|
|
||||||
if e.position.y < Camera.pan.y - 240 or e.position.y > Camera.pan.y + 480 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
e.drawAsSprite:draw(e.position.x, e.position.y)
|
|
||||||
end
|
end
|
||||||
)
|
e.drawAsSprite:draw(e.position.x, e.position.y)
|
||||||
|
end)
|
||||||
|
|
||||||
local xMargin = 4
|
local xMargin = 4
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue