Advertisement
jamawie

Stopschild

Sep 5th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. monSide = "back"
  2.  
  3. mon = peripheral.wrap(monSide)
  4. mon.setTextScale(0.5)
  5. xMax,yMax = mon.getSize()
  6.  
  7. function Bdraw(color)
  8. mon.setBackgroundColor(color)
  9. for yPos = 1,yMax do
  10. for xPos = 1,xMax do
  11. mon.setCursorPos(xPos,yPos)
  12. mon.write(" ")
  13. end
  14. end
  15. end
  16.  
  17. function Animation(xPos,yPos,color)
  18. mon.setBackgroundColor(color)
  19. mon.setCursorPos(xPos,yPos)
  20. mon.write(" ")
  21. end
  22.  
  23. --Coca
  24. xPos = { 7, 8, 9, 5, 6, 7, 8, 9,10,11, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14, 5, 6, 7, 8, 9,10,11, 7, 8, 9}
  25. yPos = {1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,8,8,8}
  26. --Cola
  27. xPos2 = {18,18,18,18,19,20,19,20,21,22,23,24,24,23,25,22,22,24,26,26,26,26,27,28,28,28,29,30,30,30,29,31}
  28. yPos2 = { 5, 4, 3, 2, 2, 2, 5, 5, 5, 5, 5, 5, 4, 3, 3, 3, 4, 3, 5, 4, 3, 2, 5, 5, 4, 3, 3, 3, 4, 5, 5, 5}
  29.  
  30. --while true do
  31. Bdraw(colors.black)
  32.  
  33. for Pixel = 1,#xPos do
  34. Animation(xPos[Pixel],yPos[Pixel],colors.white)
  35. sleep(0.1)
  36. end
  37.  
  38. for Pixel = 1,#xPos2 do
  39. Animation(xPos2[Pixel],yPos2[Pixel],colors.white)
  40. sleep(0.1)
  41. end
  42.  
  43. sleep(10)
  44. --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement