[ENH] Tile de botella
[NEW] Indicacions per a anar a la mansió de Batman al obrir totes les portes
This commit is contained in:
+75
-70
@@ -29,6 +29,7 @@ require "tiles_layer2"
|
||||
require "batvio"
|
||||
-- require "live_scene"
|
||||
require "copter"
|
||||
require "sign"
|
||||
|
||||
local DEBUG = false
|
||||
|
||||
@@ -153,6 +154,10 @@ function load_stage()
|
||||
if stage_init then
|
||||
stage_init()
|
||||
stage_loaded = stage
|
||||
stage_update = stages["stage"..stage.."_update"]
|
||||
stage_draw_back = stages["stage"..stage.."_draw_back"]
|
||||
stage_draw_middle = stages["stage"..stage.."_draw_middle"]
|
||||
stage_draw_front = stages["stage"..stage.."_draw_front"]
|
||||
print("Stage "..stage.." loaded")
|
||||
else
|
||||
print("No se ha cargado la fase "..stage)
|
||||
@@ -294,76 +299,76 @@ function update_game()
|
||||
end
|
||||
end
|
||||
|
||||
function pause()
|
||||
print("pause()")
|
||||
-- surf.source(0)
|
||||
-- surf.target(back)
|
||||
-- draw.surf(0,0,128,96,0,0)
|
||||
-- surf.target(0)
|
||||
-- surf.source(tiles)
|
||||
-- pausa_option=1
|
||||
-- pause_old_update=game_update
|
||||
-- game_update=update_pause
|
||||
end
|
||||
|
||||
function update_pause()
|
||||
draw.rectf(16,16,97,65,16)
|
||||
draw.rect(16,16,97,65,15)
|
||||
draw.text("PAUSA",54,20,15)
|
||||
|
||||
menu_count=menu_count+1
|
||||
local parpadeig=false
|
||||
if menu_count>=20 then
|
||||
parpadeig=true
|
||||
if menu_count>40 then menu_count=0 end
|
||||
end
|
||||
draw.rect(28,33+(10*(pausa_option-1)),73,9,14)
|
||||
if (not parpadeig) then draw.rect(28,33+(10*(pausa_option-1)),73,9,13) end
|
||||
|
||||
--draw.rect(28,33+(10*(pausa_option-1)),73,9,13)
|
||||
|
||||
draw.text("CONTINUAR",30,35,14)
|
||||
draw.text("MUSICA:",30,45,14)
|
||||
if music.enabled() then
|
||||
draw.text("SI",91,45,15)
|
||||
else
|
||||
draw.text("NO",91,45,15)
|
||||
end
|
||||
draw.text("SÓ:",30,55,14)
|
||||
if sound.enabled() then
|
||||
draw.text("SI",91,55,15)
|
||||
else
|
||||
draw.text("NO",91,55,15)
|
||||
end
|
||||
draw.text("EIXIR",30,65,14)
|
||||
|
||||
if key.press(key.ESCAPE) then
|
||||
surf.source(back)
|
||||
draw.surf(0,0,128,96,0,0)
|
||||
surf.source(tiles)
|
||||
game_update = pause_old_update
|
||||
elseif key.press(keyDown) or pad.press(btnDown) then
|
||||
pausa_option = pausa_option + 1
|
||||
if pausa_option == 5 then pausa_option = 1 end
|
||||
elseif key.press(keyUp) or pad.press(btnUp) then
|
||||
pausa_option = pausa_option - 1
|
||||
if pausa_option == 0 then pausa_option = 4 end
|
||||
elseif key.press(keyShoot) or pad.press(btnShoot) then
|
||||
if pausa_option==1 then
|
||||
surf.source(back)
|
||||
draw.surf(0,0,128,96,0,0)
|
||||
surf.source(tiles)
|
||||
game_update = pause_old_update
|
||||
elseif pausa_option==2 then
|
||||
music.enabled(not music.enabled())
|
||||
elseif pausa_option==3 then
|
||||
sound.enabled(not sound.enabled())
|
||||
else
|
||||
game_exit()
|
||||
game_init(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
-- function pause()
|
||||
-- print("pause()")
|
||||
-- -- surf.source(0)
|
||||
-- -- surf.target(back)
|
||||
-- -- draw.surf(0,0,128,96,0,0)
|
||||
-- -- surf.target(0)
|
||||
-- -- surf.source(tiles)
|
||||
-- -- pausa_option=1
|
||||
-- -- pause_old_update=game_update
|
||||
-- -- game_update=update_pause
|
||||
-- end
|
||||
--
|
||||
-- function update_pause()
|
||||
-- draw.rectf(16,16,97,65,16)
|
||||
-- draw.rect(16,16,97,65,15)
|
||||
-- draw.text("PAUSA",54,20,15)
|
||||
--
|
||||
-- menu_count=menu_count+1
|
||||
-- local parpadeig=false
|
||||
-- if menu_count>=20 then
|
||||
-- parpadeig=true
|
||||
-- if menu_count>40 then menu_count=0 end
|
||||
-- end
|
||||
-- draw.rect(28,33+(10*(pausa_option-1)),73,9,14)
|
||||
-- if (not parpadeig) then draw.rect(28,33+(10*(pausa_option-1)),73,9,13) end
|
||||
--
|
||||
-- --draw.rect(28,33+(10*(pausa_option-1)),73,9,13)
|
||||
--
|
||||
-- draw.text("CONTINUAR",30,35,14)
|
||||
-- draw.text("MUSICA:",30,45,14)
|
||||
-- if music.enabled() then
|
||||
-- draw.text("SI",91,45,15)
|
||||
-- else
|
||||
-- draw.text("NO",91,45,15)
|
||||
-- end
|
||||
-- draw.text("SÓ:",30,55,14)
|
||||
-- if sound.enabled() then
|
||||
-- draw.text("SI",91,55,15)
|
||||
-- else
|
||||
-- draw.text("NO",91,55,15)
|
||||
-- end
|
||||
-- draw.text("EIXIR",30,65,14)
|
||||
--
|
||||
-- if key.press(key.ESCAPE) then
|
||||
-- surf.source(back)
|
||||
-- draw.surf(0,0,128,96,0,0)
|
||||
-- surf.source(tiles)
|
||||
-- game_update = pause_old_update
|
||||
-- elseif key.press(keyDown) or pad.press(btnDown) then
|
||||
-- pausa_option = pausa_option + 1
|
||||
-- if pausa_option == 5 then pausa_option = 1 end
|
||||
-- elseif key.press(keyUp) or pad.press(btnUp) then
|
||||
-- pausa_option = pausa_option - 1
|
||||
-- if pausa_option == 0 then pausa_option = 4 end
|
||||
-- elseif key.press(keyShoot) or pad.press(btnShoot) then
|
||||
-- if pausa_option==1 then
|
||||
-- surf.source(back)
|
||||
-- draw.surf(0,0,128,96,0,0)
|
||||
-- surf.source(tiles)
|
||||
-- game_update = pause_old_update
|
||||
-- elseif pausa_option==2 then
|
||||
-- music.enabled(not music.enabled())
|
||||
-- elseif pausa_option==3 then
|
||||
-- sound.enabled(not sound.enabled())
|
||||
-- else
|
||||
-- game_exit()
|
||||
-- game_init(true)
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
|
||||
function print_analisis_field ( field )
|
||||
local field_state=" "
|
||||
|
||||
Reference in New Issue
Block a user