extends CanvasLayer

@onready var singleplayer_button: Button = $Center/VBox/SingleplayerButton
@onready var host_button: Button = $Center/VBox/HostButton
@onready var join_button: Button = $Center/VBox/JoinButton
@onready var quit_button: Button = $Center/VBox/QuitButton

func _ready() -> void:
  singleplayer_button.pressed.connect(_on_singleplayer)
  host_button.pressed.connect(_on_host)
  join_button.pressed.connect(_on_join)
  quit_button.pressed.connect(_on_quit)
  host_button.disabled = true
  join_button.disabled = true

func _on_singleplayer() -> void:
  GameState.reset()
  PlayerData.reset_run()
  EnemyData.entities.clear()
  BossData.entities.clear()
  PortalData.entities.clear()
  TavernData.entities.clear()
  get_tree().change_scene_to_file("res://scenes/world/world.tscn")

func _on_host() -> void:
  pass

func _on_join() -> void:
  pass

func _on_quit() -> void:
  get_tree().quit()
