brackeys-12/ui/counters.gd

12 lines
155 B
GDScript3
Raw Normal View History

2024-09-14 01:16:14 +00:00
extends Label
2024-09-14 01:31:14 +00:00
@export var key: String
2024-09-14 01:16:14 +00:00
2024-09-14 01:31:14 +00:00
func _ready() -> void:
Triggerer.listen(key, _on_value_change)
func _on_value_change(data):
text = data.value