1
0
Fork 0

Hide cars and logs drawing outside of playfield.

This commit is contained in:
Gonzalo Delgado 2023-09-01 07:37:52 -03:00
parent 3218c3b83c
commit 65cf8bd968
1 changed files with 4 additions and 0 deletions

View File

@ -269,6 +269,10 @@ function love.draw()
else
love.graphics.setColor(1, 1, 1)
end
love.graphics.setColor(0, 0, 0)
love.graphics.rectangle("fill", 16, -t2p(game.PLAYFIELD_OFFSET_TOP), game.SCREEN_WIDTH, t2p(game.PLAYFIELD_OFFSET_TOP))
love.graphics.rectangle("fill", 0, game.SCREEN_HEIGHT - 40, game.SCREEN_WIDTH, 48)
love.graphics.setColor(1, 1, 1)
local x, y = player.pos.x, player.pos.y
love.graphics.draw(player.sprites, player.quads.dude, x, y - 8)
x, y = player.turtlePos.x, player.turtlePos.y