Guest User

Animation ComputerCraft

a guest
Mar 29th, 2015
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.94 KB | None | 0 0
  1. p = peripheral.wrap("top")
  2. i1 = paintutils.loadImage("ayrobot1")
  3. i2 = paintutils.loadImage("ayrobot2")
  4. i3 = paintutils.loadImage("ayrobot3")
  5. i4 = paintutils.loadImage("ayrobot4")
  6. i5 = paintutils.loadImage("ayrobot5")
  7. i6 = paintutils.loadImage("ayrobot6")
  8.  
  9. p.setTextScale(2)
  10. term.redirect(p)
  11.  
  12.  
  13. function anim1()
  14.     p.setBackgroundColor(colors.black)
  15.     p.clear()
  16.     paintutils.drawImage(i1,-1,3)
  17.     sleep(0.2)
  18.     p.setBackgroundColor(colors.black)
  19.     p.clear()
  20.     paintutils.drawImage(i2,-1,3)
  21.     sleep(0.2)
  22.     p.setBackgroundColor(colors.black)
  23.     p.clear()
  24.     paintutils.drawImage(i3,-1,3)
  25.     sleep(0.2)
  26. end
  27.  
  28. function anim2()
  29.     p.setBackgroundColor(colors.black)
  30.     p.clear()
  31.     paintutils.drawImage(i4,-1,3)
  32.     sleep(0.2)
  33.     p.setBackgroundColor(colors.black)
  34.     p.clear()
  35.     paintutils.drawImage(i5,-1,3)
  36.     sleep(0.2)
  37.     p.setBackgroundColor(colors.black)
  38.     p.clear()
  39.     paintutils.drawImage(i6,-1,3)
  40.     sleep(0.2)
  41. end
  42.  
  43.  
  44. while true do
  45.     anim1()
  46.     anim2()
  47. end
Add Comment
Please, Sign In to add comment