Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.38 KB | None | 0 0
  1. fog = image.load("fog_a.png")
  2. fondo = image.load("Fondos/FONDO3.png")
  3. Boton = image.load ("botones/boton.png")
  4. salida = image.load ("Fondos/salida.png")
  5. fondo2 = image.load ("Fondos/FONDO2.png")
  6. velocidad_fog = 0.4;
  7. posicion_fog = 480;
  8. ctrl=true
  9. function pintarfog()
  10. posicion_fog = posicion_fog - velocidad_fog;
  11. if ( posicion_fog <= 0 ) then posicion_fog = 480
  12. end
  13. image.blit(fog,math.ceil(posicion_fog),0)
  14. image.blit(fog,math.ceil(posicion_fog)-480,0)
  15. end
  16. while (ctrl==true) do
  17. controls.read()
  18. pintarfog()
  19. image.blit(fondo,0,0)
  20. screen.flip()
  21. if controls.start() then
  22. ctrl=false            
  23. end
  24. end
  25. while true do
  26. screen.clear()
  27. image.blit(fondo2,0,0)
  28. controls.read()
  29. if controls.up() then
  30. image.blit(120,50,Boton)
  31. end
  32. if controls.down() then
  33. image.blit(120,50,Boton)
  34. end
  35. if controls.left() then
  36. image.blit(120,50,Boton)
  37. end
  38. if controls.right() then
  39. image.blit(120,50,Boton)
  40. end
  41. if controls.l() then
  42. image.blit(120,50,Boton)
  43. end
  44. if controls.cross() then
  45. image.blit(120,50,Boton)
  46. end
  47. if controls.triangle() then
  48. image.blit(120,50,Boton)
  49. end
  50. if controls.square() then
  51. image.blit(120,50,Boton)
  52. end
  53. if controls.circle() then
  54. image.blit(120,50,Boton)
  55. end
  56. if controls.r() then
  57. image.blit(120,50,Boton)
  58. end
  59. if controls.select() then
  60. screen.clear ()
  61. image.blit(salida,0,0)  
  62. screen.flip()
  63. screen.waitvblankstart(100)
  64. os.exit()
  65. end
  66. screen.flip()
  67. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement