12 lines
316 B
GDScript
12 lines
316 B
GDScript
extends CanvasLayer
|
|
|
|
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
|
|
|
func change_scene(target_scene_path: String) -> void:
|
|
animation_player.play("fade")
|
|
|
|
await animation_player.animation_finished
|
|
get_tree().change_scene_to_file( target_scene_path )
|
|
|
|
animation_player.play_backwards("fade")
|