Skip to content

Instantly share code, notes, and snippets.

@keith-kurak
Last active October 16, 2022 17:12
Show Gist options
  • Save keith-kurak/d3c072caed0e38056cf54ea3ec68dd79 to your computer and use it in GitHub Desktop.
Save keith-kurak/d3c072caed0e38056cf54ea3ec68dd79 to your computer and use it in GitHub Desktop.
PICO-01: Move a sprite
function _init()
x = 64
y = 64
end
function _draw()
cls()
spr(0,x,y)
end
function _update()
if (btn(➡️)) then
x+=1
end
if (btn(⬅️)) then
x-=1
end
if (btn(⬆️)) then
y-=1
end
if (btn(⬇️)) then
y+=1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment