pollen-not-included/scenes/scripts/transition_scene.gd
Dan 2a9e78b52e Refactor: Added explicit typing and void return types
- Introduced explicit typing to variables and functions across multiple scripts for better code clarity.
- Specified 'void' as the return type for functions that do not return a value.
- Removed redundant code in some scripts.
2024-05-15 10:42:16 +01:00

19 lines
No EOL
493 B
GDScript

extends CanvasLayer
signal transitioned
func _ready() -> void:
$AnimationPlayer.play("fade_to_normal")
func transition() -> void:
$AnimationPlayer.play("fade_to_black")
Log.pr("Fading to black")
func _on_animation_player_animation_finished(anim_name : StringName) -> void:
if anim_name == "fade_to_black":
Log.pr("Sending transitioned signal...")
emit_signal("transitioned")
$AnimationPlayer.play("fade_to_normal")
if anim_name == "fade_to_normal":
Log.pr("Faded to normal")