fix ending

This commit is contained in:
James Turk 2023-04-30 06:36:05 -05:00
parent 18906ce575
commit bc5579b318

View File

@ -62,7 +62,7 @@ function draw_title()
end end
function update_title() function update_title()
if scene_time() > 15 or btnp(4) then if scene_time() > 15 or btnp() then
start_level(1) start_level(1)
end end
end end
@ -107,7 +107,7 @@ function draw_explainer()
print("a bomb", 70, 118, bcolor) print("a bomb", 70, 118, bcolor)
end end
if st > 15 or btnp(4) then if st > 15 or btnp() then
start_scene("title") start_scene("title")
end end
@ -194,6 +194,10 @@ levels = {
}, },
} }
function start_level(n) function start_level(n)
if n > #levels then
start_scene("ending")
return
end
start_scene("level") start_scene("level")
last_gravity = t() last_gravity = t()
level_dets = 0 level_dets = 0
@ -458,7 +462,7 @@ function update_level()
bomb_y += 1 bomb_y += 1
end end
-- DEBUG LEVEL SELECT --DEBUG LEVEL SELECT
-- if btnp(⬇️) then -- if btnp(⬇️) then
-- level_num = max(level_num-1, 1) -- level_num = max(level_num-1, 1)
-- start_level(level_num) -- start_level(level_num)