Skip to content

Instantly share code, notes, and snippets.

Created October 16, 2015 06:37
Show Gist options
  • Save anonymous/a9089a806becc96a45c8 to your computer and use it in GitHub Desktop.
Save anonymous/a9089a806becc96a45c8 to your computer and use it in GitHub Desktop.
function _update()
pl.x+=pl.vx
pl.y+=pl.vy
if btn(0) and s==1
then pl.vx=-1 chspr=019 f=true
else pl.vx=0
end
if btn(1) and s==1
then pl.vx=1 chspr=019 f=false
else pl.vx=0
end
if btn(2) and s==1
then pl.vy=-1 chspr=003 f=false
else pl.vy=0
end
if btn(3) and s==1
then pl.vy=1 chspr=035 f=true
else pl.vy=0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment