extends Node2D

export var version = "1.2"

# Called when the node enters the scene tree for the first time.
func _ready():	
	var dir = Directory.new()
	if not dir.file_exists("packs"):
		dir.open(OS.get_executable_path().get_base_dir())
		dir.make_dir("packs")
	if not dir.file_exists("saves"):
		dir.open(OS.get_executable_path().get_base_dir())
		dir.make_dir("saves")
	
	Game.playground = $Playground
	Game.effects = $Effects
	Game.version = self.version
	
	OS.window_fullscreen = MemoryCard.get_config("fullscreen")
	if not MemoryCard.get_config("music"):
		Audio.mute_ost = true
		Audio.volume(0)
	
	if not MemoryCard.get_config("sfx"):
		Audio.mute_sfx = true
	
	if Game.effects: Game.effects.stop_all_effects()
	Game.load_level(0)
