diff options
Diffstat (limited to 'scripts/gui.gd')
-rw-r--r-- | scripts/gui.gd | 14 |
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 |