[NEW] Outro al acabar en el boss
[FIX] Abad mogut a una posició segura al acabar en el boss
This commit is contained in:
+24
-1
@@ -1,5 +1,8 @@
|
|||||||
stage1_boss ={
|
stage1_boss ={
|
||||||
time = 0,
|
time = 0,
|
||||||
|
out_x = 0,
|
||||||
|
out_y = 0,
|
||||||
|
out_speed = 8,
|
||||||
}
|
}
|
||||||
|
|
||||||
function stages.stage1_boss_ready()
|
function stages.stage1_boss_ready()
|
||||||
@@ -83,7 +86,7 @@ end
|
|||||||
|
|
||||||
function stages.stage1_boss_intro_update()
|
function stages.stage1_boss_intro_update()
|
||||||
if stage1_boss.time==0 then
|
if stage1_boss.time==0 then
|
||||||
start_scene(scenes.lluita_imp, nil, false)
|
-- start_scene(scenes.lluita_imp, nil, false)
|
||||||
stages.stage1_boss_ready()
|
stages.stage1_boss_ready()
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -96,17 +99,37 @@ function stages.stage1_boss_intro_update()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function stages.stage1_boss_intro_end()
|
function stages.stage1_boss_intro_end()
|
||||||
|
stage1_boss.out_x = 0
|
||||||
|
stage1_boss.out_y = 0
|
||||||
|
stage1_boss.out_speed = 12
|
||||||
states:finish()
|
states:finish()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- OUTRO FUNCTION
|
-- OUTRO FUNCTION
|
||||||
function stages.stage1_boss_outro_update()
|
function stages.stage1_boss_outro_update()
|
||||||
stage1_boss.time = stage1_boss.time + 1
|
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
|
||||||
|
|
||||||
|
if stage1_boss.out_y>=6 then
|
||||||
states:next()
|
states:next()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function stages.stage1_boss_outro_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()
|
stages.stage1_boss_finished()
|
||||||
remove_actor(boss)
|
remove_actor(boss)
|
||||||
unload_boss_stage()
|
unload_boss_stage()
|
||||||
|
|||||||
Reference in New Issue
Block a user