23 lines
501 B
GDScript
23 lines
501 B
GDScript
class_name GameOver extends Control
|
|
|
|
@export var game_over_text: Label
|
|
|
|
func _ready() -> void:
|
|
UiManager.game_over_screen = self
|
|
|
|
func set_game_over_label(go_text:String)->void:
|
|
game_over_text.text = go_text
|
|
|
|
|
|
func _on_retry_button_pressed() -> void:
|
|
Global.game_scene.reload_game_scene()
|
|
self.hide()
|
|
## auch loding ligic aber eifach die gleiche szene
|
|
|
|
func _on_main_menu_pressed() -> void:
|
|
Global.game_scene.load_main_menu()
|
|
self.hide()
|
|
|
|
func _on_quit_pressed() -> void:
|
|
get_tree().quit()
|