extends Node2D

onready var transition = $AnimationPlayer

func _ready():
	transition.play("fade_out")

func _on_KinematicBody2D_on_finish():
	transition.play("fade_in")
	yield( get_node("AnimationPlayer"), "animation_finished" )
	get_tree().change_scene("res://scenes/Ending.tscn")
