[NEW] Outro al acabar en el boss

[FIX] Abad mogut a una posició segura al acabar en el boss
This commit is contained in:
2026-05-19 21:51:44 +02:00
parent c5c72abc73
commit 6276948f87
+25 -2
View File
@@ -1,5 +1,8 @@
stage1_boss ={
time = 0,
out_x = 0,
out_y = 0,
out_speed = 8,
}
function stages.stage1_boss_ready()
@@ -83,7 +86,7 @@ end
function stages.stage1_boss_intro_update()
if stage1_boss.time==0 then
start_scene(scenes.lluita_imp, nil, false)
-- start_scene(scenes.lluita_imp, nil, false)
stages.stage1_boss_ready()
end
@@ -96,17 +99,37 @@ function stages.stage1_boss_intro_update()
end
function stages.stage1_boss_intro_end()
stage1_boss.out_x = 0
stage1_boss.out_y = 0
stage1_boss.out_speed = 12
states:finish()
end
-- OUTRO FUNCTION
function stages.stage1_boss_outro_update()
stage1_boss.time = stage1_boss.time + 1
-- black out
if stage1_boss.time%stage1_boss.out_speed==0 then
if stage1_boss.out_x==8 then
stage1_boss.out_x = 0
stage1_boss.out_y = stage1_boss.out_y+1
end
draw.rectf(stage1_boss.out_x*32,stage1_boss.out_y*32,32,32,16)
stage1_boss.out_x = stage1_boss.out_x +1
if stage1_boss.out_speed>1 then stage1_boss.out_speed = stage1_boss.out_speed -1 end
end
states:next()
if stage1_boss.out_y>=6 then
states:next()
end
end
function stages.stage1_boss_outro_end()
local abad_x, abad_y = coords.room_to_world ( 54, 8, 3 )
abad:move(abad_x, abad_y)
abad_make_safe( true )
stages.stage1_boss_finished()
remove_actor(boss)
unload_boss_stage()