Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.50 KB | None | 0 0
  1. --se cargan imagenes
  2. fon1 = image.load("imagenes/fon1.png")
  3.        fon2 = image.load("imagenes/fon2.png")
  4.        fon3 = image.load("imagenes/fon3.png")
  5.        fon4 = image.load("imagenes/fon4.png")
  6.         mas = 1
  7.  
  8.       menu = function()
  9.               if mas == 1 then
  10.                       image.blit(0,0,fon1)
  11.               elseif mas == 2 then  
  12.                       image.blit(0,0,fon2)
  13.               elseif mas == 3 then
  14.                       image.blit(0,0,fon3)
  15.               elseif mas == 4 then
  16.                       image.blit(0,0,fon4)
  17.                 end                  
  18.               if controls.press("up") then
  19.                       mas = mas - 1
  20.               end
  21.               if controls.press("down") then
  22.                       mas = mas + 1
  23.               end    
  24.               if mas >4 then
  25.                       mas = 1
  26.               end
  27.               if mas <1 then
  28.                       mas = 4
  29.               end
  30.               if controls.press("cross") then
  31.  
  32.                       if mas == 1 then
  33.                               dofile("juego.lua")
  34.                       elseif mas == 2 then
  35.                               opciones()
  36.                       elseif mas == 3 then
  37.                               creditos()
  38.                       elseif mas == 4 then
  39.                               os.quit()
  40.                      
  41.    
  42.                       end
  43.  
  44.               end
  45.  
  46.       end  
  47.       while true do    
  48.               controls.read()
  49.               menu()            
  50.               screen.flip()              
  51.       end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement