Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function _init()
- player={
- x=63,
- y=63,
- fx=false,
- fy=true,
- sp=2
- }
- end
- function _update()
- --player movement--
- if btn(➡️) then
- player.x+=1
- player.fx=false
- player.sp=1
- end
- if btn(⬅️) then
- player.x-=1
- player.fx=true
- player.sp=1
- end
- if btn(⬇️) then
- player.y+=1
- player.fy=true
- player.sp=2
- end
- if btn(⬆️) then
- player.y-=1
- player.fy=false
- player.sp=2
- end
- end
- function _draw()
- cls()
- spr(player.sp,player.x,player.y,1,1,player.fx,player.fy)
- end
Advertisement
Add Comment
Please, Sign In to add comment