brackeys-12/population_count.gd
2024-09-14 23:43:31 -04:00

13 lines
308 B
GDScript

extends Label
var key = "population"
var key2 = "max_population"
func _ready() -> void:
Triggerer.listen(key, _on_value_change)
Triggerer.listen(key2, _on_value_change)
func _on_value_change(data):
text = "%s/%s" % [str(Persister.get_value("population")), str(Persister.get_value("max_population"))]