extends Node2D

enum StartOptions {
	TitleScreen,
	InitialMap
}

@export var starting_scene := StartOptions.TitleScreen

@onready var map_transitioner: Node = $"Map Transitioner"
@onready var map_ui: Control = $"Gui/Map UI"

# Private Methods
func _ready() -> void:
	match starting_scene:
		StartOptions.TitleScreen:
			map_transitioner.call_deferred("InstantiateTitleScreen")
		StartOptions.InitialMap:
			map_transitioner.call_deferred("InstantiateInitialMap")


func _on_map_changed(map_id: Enums.MapIds) -> void:
	if map_id != Enums.MapIds.TITLE_SCREEN:
		map_ui.set_deferred("visible", true)
	else:
		map_ui.set_deferred("visible", false)
