Fixed bugs with text animations

This commit is contained in:
Nicholas 2025-05-23 12:08:17 +01:00
parent 00b9e5ab28
commit 01388819af
3 changed files with 5 additions and 3 deletions

View File

@ -7,5 +7,5 @@ signal playerExit
func _on_body_entered(body: Node2D) -> void:
if body.name == "player":
emit_signal("playerExit")
await get_tree().create_timer(6).timeout
await get_tree().create_timer(2).timeout
get_tree().change_scene_to_packed(credits)

View File

@ -209,3 +209,4 @@ offset_bottom = -16.0
text = "placeholder"
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="playerExit" from="." to="fadeOut/AnimationPlayer" method="_on_exit_zone_player_exit"]

View File

@ -1,9 +1,10 @@
extends AnimationPlayer
func _ready() -> void:
play("text")
await get_tree().create_timer(2)
play("fadeIn")
func _on_exit_zone_player_exit() -> void:
play("fadeOut")
play("text")
await get_tree().create_timer(4)