Bees return nectar, UI stuff

This commit is contained in:
Dan Baker 2024-05-04 15:13:59 +01:00
parent 76e7ec7ec7
commit 5865778c77
12 changed files with 175 additions and 17 deletions

View file

@ -0,0 +1,23 @@
extends Control
class_name UIComponent
var update_interval : float = 1
var last_update : float = 0
@onready var nectar_bar = get_node("%NectarBar")
func _ready():
Log.pr("UIComponent ready")
update_ui()
func _process(delta):
last_update += delta
if last_update > update_interval:
last_update = 0
update_ui()
func update_ui():
Log.pr("UIComponent update_ui")
nectar_bar.value = GameState.gathered_nectar