Skip to content

Commit 7a7814c

Browse files
committed
updated timer
1 parent d70659c commit 7a7814c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

game_boards/all_common/common.gd

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,8 @@ func highlight_first_swap(hbox:HBoxContainer) -> void:
9090
highlight_gem1.highlight()
9191
highlight_gem2.highlight()
9292
# Optionally set a timer to remove highlight after a few seconds
93-
var timer = Timer.new()
94-
timer.wait_time = 3.0 # 3 seconds
95-
timer.one_shot = true
96-
timer.autostart = true
97-
timer.connect("timeout", self._on_HighlightTimer_timeout)
98-
add_child(timer)
99-
timer.start()
93+
await delay_time(hbox, 3)
94+
_on_HighlightTimer_timeout()
10095

10196
func _on_HighlightTimer_timeout():
10297
if highlight_gem1 and highlight_gem2:

0 commit comments

Comments
 (0)