the start of marathon mode

This commit is contained in:
Haze Weathers 2024-03-05 18:20:32 -05:00
parent 83f0bccd9a
commit d06acf2522
18 changed files with 607 additions and 26 deletions

View file

@ -23,6 +23,7 @@ func _on_Famira_health_changed(amount) -> void:
func _on_cutscene_finished() -> void:
$GUI.visible = true
sg2083.visible = true
sg2083.state = sg2083.State.STAND
famira.visible = true
@ -40,3 +41,18 @@ func _on_Famira_died() -> void:
var tween = create_tween()
tween.set_trans(Tween.TRANS_CUBIC)
tween.tween_property($"%Camera", "global_position:x", famira.global_position.x - 128, 0.5)
tween.tween_interval(10.0)
tween.tween_callback(self, "_on_death_cooldown")
func _on_death_cooldown() -> void:
if Game.marathon_mode:
Game.current_level += 1
if Game.current_level > LevelData.marathon_end:
Fade.fade_out(Options.transition_speed_secs)
yield(Fade, "fade_finished")
SceneManager.change_scene(load("res://menus/marathon_results.tscn").instance())
else:
Game.change_map(LevelData.levels[Game.current_level].scene)
else:
Game.change_map(load("res://menus/level_select_scholar.tscn"))