Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fog = image.load("fog_a.png")
- fondo = image.load("Fondos/FONDO3.png")
- Boton = image.load ("botones/boton.png")
- salida = image.load ("Fondos/salida.png")
- fondo2 = image.load ("Fondos/FONDO2.png")
- upPressed = image.load("Botones/up.png")
- downPressed = image.load("Botones/donw.png")
- leftPressed = image.load("Botones/left.png")
- rightPressed = image.load("Botones/rigth.png")
- LPressed = image.load("Botones/l.png")
- crossPressed = image.load("Botones/cross.png")
- trianglePressed = image.load("Botones/triangle.png")
- squarePressed = image.load("Botones/square.png")
- circlePressed = image.load("Botones/circle.png")
- RPressed = image.load("Botones/R.png")
- velocidad_fog = 0.4;
- posicion_fog = 480;
- ctrl=true
- function pintarfog()
- posicion_fog = posicion_fog - velocidad_fog;
- if ( posicion_fog <= 0 ) then posicion_fog = 480
- end
- image.blit(fog,math.ceil(posicion_fog),0)
- image.blit(fog,math.ceil(posicion_fog)-480,0)
- end
- while (ctrl==true) do
- controls.read()
- pintarfog()
- image.blit(fondo,0,0)
- screen.flip()
- if controls.start() then
- ctrl=false
- end
- end
- while true do
- screen.clear()
- image.blit(fondo2,0,0)
- controls.read()
- if controls.up() then
- image.blit(120,50,upPressed)
- end
- if controls.down() then
- image.blit(120,50,downPressed)
- end
- if controls.left() then
- image.blit(120,50,leftPressed)
- end
- if controls.right() then
- image.blit(120,50,rightPressed)
- end
- if controls.l() then
- image.blit(120,50,LPressed)
- end
- if controls.cross() then
- image.blit(120,50,crossPressed)
- end
- if controls.triangle() then
- image.blit(120,50,trianglePressed)
- end
- if controls.square() then
- image.blit(120,50,squarePressed)
- end
- if controls.circle() then
- image.blit(120,50,circlePressed)
- end
- if controls.r() then
- image.blit(120,50,RPressed)
- end
- if controls.select() then
- screen.clear ()
- image.blit(salida,0,0)
- screen.flip()
- screen.waitvblankstart(100)
- os.exit()
- end
- screen.flip()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement