Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- px=0
- py=0
- direction=-1
- function _update()
- if not btn(direction) then
- direction=-1
- end
- for i=0,3 do
- if btnp(i) and (direction==i or direction==-1) then
- if i<=1 then
- px+=(i-0.5)*16
- else
- py+=(i-2.5)*16
- end
- direction=i
- end
- end
- end
- function _draw()
- cls()
- print("direction "..direction)
- print("x "..px..", y "..py)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement