extends Node


# Declare member variables here. Examples:
# var a = 2
# var b = "text"
var levels = {}

# Called when the node enters the scene tree for the first time.
func _ready():
	for i in get_children():
		levels[i.name] = i
		call_deferred('remove_child',i)
	pass # Replace with function body.

func loadlevel(arg,arg2):
	if levels[arg].get_parent() != self: call_deferred('add_child',levels[arg])
	if arg2: 
		levels[arg].call_deferred('hide')
	else:
		levels[arg].call_deferred('show')

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