extends Node


@onready var level_path = "levels/level_"


#Show upcoming level

func _ready():
	$"/root/Global".Level = 5 
	await get_tree().create_timer(2.0).timeout
	$Label.show()
	$CharacterBody2D_level.show()
	$CharacterBody2D_level2.show()
	$CharacterBody2D_level3.show()
	$CharacterBody2D_level4.show()
	$CharacterBody2D_level5.show()
	#print("Visibility On!") #Verify visibility
	await get_tree().create_timer(3.25).timeout
	$Label.hide()
	$CharacterBody2D_level.hide()
	$CharacterBody2D_level2.hide()
	$CharacterBody2D_level3.hide()
	$CharacterBody2D_level4.hide()
	$CharacterBody2D_level5.hide()
	#print("Visibility Off!")
	await get_tree().create_timer(1.0).timeout
	get_tree().change_scene_to_file(str(level_path,$"/root/Global".Level,".tscn"))
	
