summaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
authorcursed22bc <admin@pixeldawn.org>2026-03-01 12:30:05 +0200
committercursed22bc <admin@pixeldawn.org>2026-03-01 12:30:05 +0200
commitde94226e1b302cee2a006f78f0153aa5fa081f47 (patch)
tree31859ec7de767dafe5e7474e14f74f473eab6ba8 /main.lua
parent8f9182baff36d33c07c5eb8df795e3cfcd5307a5 (diff)
player and animation
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.lua b/main.lua
index 3f25812..5a4e2f0 100644
--- a/main.lua
+++ b/main.lua
@@ -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()