wolf: add player movement

This commit is contained in:
Fabien Freling 2026-02-10 13:48:32 +01:00
parent 3d0bb789de
commit 803a8b8d91

View file

@ -32,6 +32,7 @@ end
function draw_minimap()
local tile_size = 4
map(0, 0, 20, 20, 31, 31, 0x0000, tile_size, tile_size)
circfill(20 + (player.origin.x * tile_size), 20 + (player.origin.y * tile_size), 2, 5)
end
function _draw()
@ -45,3 +46,10 @@ function _draw()
end
draw_minimap()
end
function _update()
if (btn(0)) player.origin.x -= 2
if (btn(1)) player.origin.x += 2
if (btn(2)) player.origin.y -= 2
if (btn(3)) player.origin.y += 2
end