This repository has been archived on 2024-04-19. You can view files and clone it, but cannot push or open issues or pull requests.
Jessist/addons/scene_transition/loading_scene.gd

20 lines
431 B
GDScript3
Raw Normal View History

2022-06-18 13:05:48 +02:00
extends Control
signal animation_finished
func fade_in():
$AnimationPlayer.play("fade_in")
func fade_out():
$AnimationPlayer.play("fade_out")
func _process(delta):
if scene_manager.loading_scene_path:
var progress = scene_manager.get_progress()
if progress >= 0 :
$Control/ProgressBar.value = progress * 100
func _on_AnimationPlayer_animation_finished(anim_name):
emit_signal("animation_finished", anim_name)