diff options
| author | cursed22bc <admin@pixeldawn.org> | 2026-03-01 12:30:05 +0200 |
|---|---|---|
| committer | cursed22bc <admin@pixeldawn.org> | 2026-03-01 12:30:05 +0200 |
| commit | de94226e1b302cee2a006f78f0153aa5fa081f47 (patch) | |
| tree | 31859ec7de767dafe5e7474e14f74f473eab6ba8 /main.lua | |
| parent | 8f9182baff36d33c07c5eb8df795e3cfcd5307a5 (diff) | |
player and animation
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() |
