brackeys-12/population_count.gd

14 lines
308 B
GDScript3
Raw Permalink Normal View History

2024-09-15 03:43:31 +00:00
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"))]