From a008250735212dfecdab39d08e931be7a87b7975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Mart=C3=ADnez=20Palacio?= Date: Tue, 29 Oct 2024 01:00:53 +0100 Subject: [PATCH] Fix credits hiding when hitting continue more than once --- Scripts/UI/prototype_credits.gd | 3 +-- world/world.tscn | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Scripts/UI/prototype_credits.gd b/Scripts/UI/prototype_credits.gd index d824f89..715f842 100644 --- a/Scripts/UI/prototype_credits.gd +++ b/Scripts/UI/prototype_credits.gd @@ -31,13 +31,12 @@ func reveal(reward_applicable: bool): t = 0.0 opacity_to = 1.0 -func give_way(): +func _on_given_way(): opacity_from = 1.0 opacity_to = 0.0 t = 0.0 func _input(event: InputEvent): if event.is_action_pressed("ui_accept") and t >= 1.0: - give_way() given_way.emit() get_viewport().set_input_as_handled() diff --git a/world/world.tscn b/world/world.tscn index ab69313..1b39d5c 100644 --- a/world/world.tscn +++ b/world/world.tscn @@ -458,8 +458,9 @@ polygon = PackedVector2Array(-84, -31, -76, -57, -43, -71, -84, -71) [connection signal="dialogue_completed" from="TextboxUI" to="CutsceneManager" method="_on_ui_dialogue_completed"] [connection signal="dialogue_continued" from="TextboxUI" to="SoundManager" method="_on_ui_dialogue_continued"] [connection signal="dialogue_opened" from="TextboxUI" to="SoundManager" method="_on_ui_dialogue_opened"] -[connection signal="given_way" from="Fades/Control/Credits" to="SoundManager" method="_on_game_pause_toggled" binds= [false]] -[connection signal="reward_requested" from="Fades/Control/Credits" to="." method="_on_credits_requested_reward"] +[connection signal="given_way" from="Fades/Control/Credits" to="Fades/Control/Credits" method="_on_given_way" flags=6] +[connection signal="given_way" from="Fades/Control/Credits" to="SoundManager" method="_on_game_pause_toggled" flags=6 binds= [false]] +[connection signal="reward_requested" from="Fades/Control/Credits" to="." method="_on_credits_requested_reward" flags=6] [connection signal="attack_did_hit" from="HiroPlayer" to="ShadowClone" method="_on_player_attack_did_hit"] [connection signal="attack_did_hit" from="HiroPlayer" to="ReedAI" method="_on_player_attack_did_hit"] [connection signal="attacked" from="HiroPlayer" to="SoundManager" method="_on_humanoid_character_attacked"]