meat_madness_redux/godot/screens/death.gd

27 lines
580 B
GDScript3
Raw Normal View History

2022-11-27 19:55:11 -07:00
extends Control
2022-11-27 20:11:34 -07:00
func _ready():
$Blackout.visible = true
$Menu.visible = false
2022-11-27 19:55:11 -07:00
func _on_RetryButton_pressed():
pass # Replace with function body.
func _on_MenuButton_pressed():
var _err = get_tree().change_scene("res://screens/title.tscn")
func _on_QuitButton_pressed():
get_tree().quit()
func _on_BlackoutTimer_timeout():
2022-11-27 20:11:34 -07:00
var dialog = Dialogic.start("end")
dialog.connect("tree_exited", self, "_on_dialogue_done")
add_child(dialog)
func _on_dialogue_done():
$Blackout.visible = false
$Menu.visible = true
$TitleScreenMusic.play()
$Menu/RetryButton.grab_focus()