diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-11-18 02:11:52 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-11-18 02:11:52 +0100 |
| commit | 95f0826c2c168b34d41c8d1eed853ce4c9dc018c (patch) | |
| tree | 2e9cd4e7e997782c6e1a588c3fc764aa624feed2 /countdown.gd | |
| parent | 41be616f2dd56bdc58df50f568c6efbf944742eb (diff) | |
| download | nj26-95f0826c2c168b34d41c8d1eed853ce4c9dc018c.tar.gz | |
Set countdown.tscn as child of Spatial.tscn
Diffstat (limited to 'countdown.gd')
| -rw-r--r-- | countdown.gd | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/countdown.gd b/countdown.gd index 7788576..b18c3d8 100644 --- a/countdown.gd +++ b/countdown.gd @@ -3,11 +3,12 @@ extends Node2D signal timeout func _process(_delta): - if $Timer.time_left < 1: + if $Timer.time_left < 1 and not $Timer.is_stopped(): emit_signal("timeout") + $CanvasLayer/CenterContainer/countdown.visible = false $CanvasLayer/CenterContainer/countdown.text = "%d" % $Timer.time_left # Called when the node enters the scene tree for the first time. func _ready(): - $Timer.start(5) + $Timer.start() |
