aboutsummaryrefslogtreecommitdiff
path: root/scripts/gui.gd
diff options
context:
space:
mode:
authorjacopograndi <jacopo.grandi@outlook.it>2022-01-17 19:41:46 +0100
committerjacopograndi <jacopo.grandi@outlook.it>2022-01-17 19:41:46 +0100
commitf75ee64e21f67b4f27404147aedaa63750058d5a (patch)
tree8e35f5b0ca986169e46ef1f90c3fdd951a9af113 /scripts/gui.gd
parenta7bda4264b45c0c64fd81ac91b4f1fbbc539e314 (diff)
wave
Diffstat (limited to 'scripts/gui.gd')
-rw-r--r--scripts/gui.gd14
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/gui.gd b/scripts/gui.gd
index 71eaf76..3ad47aa 100644
--- a/scripts/gui.gd
+++ b/scripts/gui.gd
@@ -2,22 +2,30 @@ extends Control
var player : Node
var control : Node
+var wave : Node
var bottom_bar : Control
var top_bar : Control
+var _wave_ongoing : Panel
func _fetch ():
var root = get_tree().root.get_node("world")
player = root.get_node("player")
control = player.get_node("control")
+ wave = root.get_node("wave")
if bottom_bar == null: bottom_bar = get_node("bottom_bar")
if top_bar == null: top_bar = get_node("top_bar")
+ if _wave_ongoing == null: _wave_ongoing = $wave_ongoing_indicator
func _ready():
_fetch()
-func refresh (in_editor : bool):
+func refresh ():
_fetch()
- bottom_bar.refresh(in_editor)
- top_bar.refresh(in_editor)
+
+ bottom_bar.refresh(control.ineditor)
+ top_bar.refresh(control.ineditor)
+
+ if wave.ongoing: _wave_ongoing.visible = true
+ else: _wave_ongoing.visible = false