meat_madness_redux/godot/screens/death.gd

32 lines
739 B
GDScript

extends Control
func _ready():
$Blackout.visible = true
$Menu.visible = false
func _on_RetryButton_pressed():
pass # Replace with function body.
func _on_MenuButton_pressed():
var _err = get_tree().change_scene("res://screens/TitleScreen.tscn")
func _on_CreditsButton_pressed():
var dialog = Dialogic.start("credits")
dialog.connect("tree_exited", self, "_on_dialogue_done")
add_child(dialog)
func _on_QuitButton_pressed():
get_tree().quit()
func _on_BlackoutTimer_timeout():
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()