extends Control

func _ready():
	$VBoxContainer/ScoreLabel.text = "Final Score: %d" % Global.current_score
	$VBoxContainer/RestartButton.pressed.connect(_on_restart_pressed)
	$VBoxContainer/MenuButton.pressed.connect(_on_menu_pressed)

func _on_restart_pressed():
	Global.reset_score()
	get_tree().change_scene_to_file("res://scenes/game.tscn")

func _on_menu_pressed():
	Global.reset_score()
	get_tree().change_scene_to_file("res://scenes/main_menu.tscn")
