Add utility strings, update game state with drone count and points calculation.

This commit is contained in:
Dan 2024-05-09 15:42:04 +01:00
parent d879ca30bd
commit 491395e6b9
7 changed files with 105 additions and 5 deletions

View file

@ -8,6 +8,7 @@ var last_update : float = 0
@onready var help_text_container = get_node("%HelpTextContainer")
@onready var help_text_items = help_text_container.get_children()
@onready var level_text_label = get_node("%LevelText")
@onready var level_timer_label = get_node("%LevelTimer")
func _ready():
@ -24,10 +25,12 @@ func _process(delta):
if GameState.level_complete:
update_ui()
level_timer_label.text = Str.seconds_to_hms(GameState.level_timer)
func update_ui():
nectar_bar.value = GameState.gathered_nectar
nectar_bar.max_value = GameState.required_nectar
func hide_help_text():
for item in help_text_items:
item.hide()