extends Sprite

export(PackedScene) var snow_flake = preload("res://snow_flake.tscn")
onready var animation = $AnimationPlayer
onready var timer = $Timer

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


# Called when the node enters the scene tree for the first time.
func _ready():
	animation.play("back_forth")
	pass

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

func spawn_snow_flake():
	var instance = snow_flake.instance()
	add_child(instance)
	timer.wait_time = rand_range(0.1, 1)
	pass

func _on_Timer_timeout():
	spawn_snow_flake()
	pass
