extends Control

@onready var waveInfo = $CenterContainer/VBoxContainer/HBoxContainer/WaveInfo
@onready var destroyedInfo = $CenterContainer/VBoxContainer/HBoxContainer2/DestroyedInfo

@onready var mainMenu = preload("res://scenes/UI/mainMenu/mainMenu.tscn")

func _ready() -> void:
	waveInfo.text = str(Globals.currentWave)
	destroyedInfo.text = str(Globals.destroyedShips)


func _on_button_pressed() -> void:
	loadMainMenu()

func loadMainMenu():
	get_tree().get_root().add_child(load("res://scenes/UI/mainMenu/mainMenu.tscn").instantiate())
	queue_free()
	
