- 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.
19 lines
No EOL
493 B
GDScript
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")
|
|
|