pegchamp/Effects/FadeOut.gd

12 lines
292 B
GDScript3
Raw Normal View History

2021-09-08 08:27:14 +00:00
extends CanvasLayer
# set scene you want to load, uses main menu as fallback
var scene_to_load = "res://Menu/MenuPage.tscn"
func _ready():
$TransitionSprite.visible = true
2021-09-14 10:22:39 +00:00
$AnimationPlayer.play("FadeOut")
2021-09-08 08:27:14 +00:00
func finish_animation():
var _new_scene = get_tree().change_scene(scene_to_load)