Advertisement
Guest User

Untitled

a guest
Feb 7th, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.30 KB | None | 0 0
  1. --padla
  2. padx=52
  3. pady=122
  4. padw=24
  5. padh=4
  6.  
  7. function movepaddle()
  8.     if btn (0) and
  9.     padx>0 then
  10.         padx-=2
  11.     elseif btn(1) and
  12.         padx<104 then
  13.         padx+=2
  14.     end
  15. end
  16.  
  17.  
  18. function _update()
  19. movepaddle()
  20.  
  21. end
  22.  
  23. function _draw()
  24. rectfill(0,0,128,128,15)
  25. rectfill(padx, pady, padx+padw,pady+padw,14)
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement