extends Node2D

##TODO Would really like to adjust the viewports, cameras, and 
# overall scale from here. 

# Declare member variables here. Examples:
# var a = 2
# var b = "text"
export var debug_singletons :bool = false

export var starting_level: PackedScene
export var player_hud: PackedScene
export var start_screen: PackedScene

onready var viewport_container = $ViewportContainer
onready var viewport = $"%Viewport"
onready var lobby = $ViewportContainer/Viewport/Lobby


var game_size :Vector2
onready var window_scale :float



# Called when the node enters the scene tree for the first time.
func _ready():
	game_size = viewport.size
	window_scale = (OS.window_size / game_size).x
	assert(starting_level != null, "Main: starting level not specified.")
	assert(player_hud != null, "Main: player HUD not specified.")
	assert(is_instance_valid(lobby), "Main: No lobby scene found.")
	
	##TODO: Once a start screen is there, go there instead of lobby UI.
	# Or shift this over to UIManager singleton
	if is_instance_valid(start_screen) == false:
		lobby.visible = true

# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
#	pass
