extends Node

var soundertscn = load("res://LieDownBeforeSleep/sounder.tscn")

var preset_colors = [
	Color.greenyellow,
	Color.deeppink,
	Color.lavender,
	Color.aqua,
	Color.greenyellow,
	Color.deeppink,
	Color.lavender,
	Color.aqua,
	Color.greenyellow,
	Color.deeppink,
	Color.lavender,
	Color.aqua
	]

func _ready():
	randomize()
	for i in range(12):
		var sounder = soundertscn.instance()
		sounder.set_preset(i)
		#directrly set param is also possible
		# => sounder.set_param([43, 1000, 316, 3.04, 2.45, 2.06, 0.67, 0.2])
		sounder.set_color(preset_colors[i])
		sounder.audible_range_max = 20
		add_child(sounder)
		sounder.relocate(Vector2(0, 0), [6, 26])

func _on_Timer_timeout():
	Global.nextScene()
