Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- imagen={}
- sonido={}
- menu={}
- for i = 1,4 do
- imagen[i]=image.load("imagenes/imagen"..i..".png")
- menu[i]=image.load("imagenes/menu"..i..".png")
- sonido[i]=image.load("sonidos/sonido"..i..".mp3")
- end
- current = 1
- while true do
- controls.read()
- if controls.press("circle") then
- dofile("script.lua")
- end
- menu[current]:blit(0,0)
- if controls.press("down") then
- if current==#menu then current = 1 else current=current+1 end
- end
- if controls.press("up") then
- if current==1 then current = #menu else current=current-1 end
- end
- if controls.press("cross") then
- while true do
- sonido[current]:play()
- imagen[current]:blit(0,0)
- screen.flip()
- if sonido[current]:percent()>=100 then
- break
- end
- end
- end
- screen.flip()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement