diff options
Diffstat (limited to 'main.lua')
| -rw-r--r-- | main.lua | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1,5 +1,7 @@ local VIRTUAL_WIDTH, VIRTUAL_HEIGHT = 16*10*3, 9*10*3 local CANVAS_PADDING = 6 + +DEBUG = true local CANVAS_WIDTH = VIRTUAL_WIDTH + CANVAS_PADDING local CANVAS_HEIGHT = VIRTUAL_HEIGHT + CANVAS_PADDING local WORLD_TO_CANVAS = 3 @@ -114,6 +116,10 @@ function love.keypressed(key, scancode, isrepeat) if key == "f11" then love.window.setFullscreen(not love.window.getFullscreen(), "desktop") end + if (key == "space" or key == "up" or key == "w") and not isrepeat then + local player = world and world:getPlayer() + if player then player:jump() end + end end function love.draw() |
