From 2efc56813b44b3c793a87b24a012a412b5bad7a3 Mon Sep 17 00:00:00 2001 From: ra314 Date: Wed, 13 Apr 2022 21:42:12 +0930 Subject: [PATCH] Fixedwhen the UI shows up for the player. Previously it was shown when the players turn had ended for a brief second. --- Scripts/Levels/Level Main.gd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Scripts/Levels/Level Main.gd b/Scripts/Levels/Level Main.gd index 7b48598..c1ff7f1 100644 --- a/Scripts/Levels/Level Main.gd +++ b/Scripts/Levels/Level Main.gd @@ -107,6 +107,7 @@ func _ready(): grid.connect("swap_start", self, "before_process") grid.connect("swap_end", self, "after_process") grid.connect("shuffle_tiles_end", self, "after_process") + grid.connect("shuffle_tiles_end", self, "update_curr_player_ui_and_show_berries") grid.connect("collect_mana_from_grid", self, "distribute_mana") grid.connect("extra_move", self, "add_extra_move") grid.ready() @@ -115,6 +116,9 @@ func _ready(): start_turn() +func update_curr_player_ui_and_show_berries(): + curr_player.update_ui(true) + func create_organism_ability_notification(organism, duration, alignment): _root.create_notification(organism.ability_description, duration, alignment) @@ -138,7 +142,6 @@ func distribute_mana(mana_array): for organism in curr_player.organisms: var mana_to_give = mana_array[organism.mana_enum] mana_array[organism.mana_enum] -= organism.change_mana(mana_to_give) - curr_player.update_ui(true) signal turn_starting func start_turn():