Last active
October 16, 2022 17:12
-
-
Save keith-kurak/d3c072caed0e38056cf54ea3ec68dd79 to your computer and use it in GitHub Desktop.
PICO-01: Move a sprite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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