[FIX] L'animació del text dels diàlegs ja es pot skipar i es queda en pantalla per a llegir

This commit is contained in:
2026-05-12 22:31:24 +02:00
parent 7bf66245ce
commit d03406825c
+35 -20
View File
@@ -213,7 +213,7 @@ function start_scene(_scene, offset, stop_music)
-- game_update=update_scene
scene.running = true
if not stop_music then scene.stop_music = false end
print("SCENE START")
-- print("SCENE START")
states:executar("scene", true); -- guardar l'estat anterior i executar
end
@@ -387,7 +387,6 @@ function update_scene()
scenes.wait=0
draw_scene()
if scenes.step>8 then
-- print("SCENES.DIE= "..scenes.die)
if scenes.die>0 then
scenes.die=scenes.die-1
if scenes.die==0 then
@@ -426,28 +425,44 @@ function update_scene()
end
end
if scenes.step>8 then
if controller:check("shoot") or controller:check("down") or
controller:check("up") or controller:check("left") or
controller:check("right") or key.press(key.RETURN) then
-- if scenes.step>8 then
-- if controller:check("shoot") or controller:check("down") or
-- controller:check("up") or controller:check("left") or
-- controller:check("right") or key.press(key.RETURN) then
-- if scenes.dnum==#scenes.current_scene then
-- if scenes.stop_music then music.stop() end
-- -- if batman.endgame then
-- -- final_init()
-- -- fade.fadeoutin()
-- -- else
-- -- game_update=old_update
-- states:next()
-- -- end
-- else
-- -- scenes.dnum=scenes.dnum+1
-- -- scenes.step=2
-- next_scene()
-- end
-- end
-- elseif key.press(keyShoot) or pad.press(btnShoot) then
-- scenes.step=8
-- scenes.die =20
-- print("SKIP")
-- end
if controller:check("shoot") then
if scenes.step<8 then
-- skip play text
scenes.step=8
elseif scenes.die==0 and scenes.step>=8 then
-- continue scene
if scenes.dnum==#scenes.current_scene then
if scenes.stop_music then music.stop() end
-- if batman.endgame then
-- final_init()
-- fade.fadeoutin()
-- else
-- game_update=old_update
states:next()
-- end
if scene.stop_music then music.stop() end
states:next()
else
-- scenes.dnum=scenes.dnum+1
-- scenes.step=2
next_scene()
end
end
elseif key.press(keyShoot) or pad.press(btnShoot) then
scenes.step=8
end
end
end
end
function end_scene()