This commit is contained in:
2026-04-10 12:07:01 +02:00
parent f671ab3419
commit 5698d06485
7 changed files with 92 additions and 174 deletions

View File

@@ -20,10 +20,14 @@ func _ready() -> void:
push_error("CurrencyTile '%s' missing game_state reference" % String(name))
return
game_state.ready.connect(_on_level_game_state_ready)
func _on_level_game_state_ready() -> void:
var label_string = game_state.get_currency_name(_currency_id)
_currency_id = game_state.get_currency_id(currency)
_label.text = "%s:" % game_state.get_currency_name(_currency_id)
_label.text = "%s:" % label_string
_icon.texture = game_state.get_currency_icon(_currency_id)
_debug_button.text = "+100 %s" % game_state.get_currency_name(_currency_id)
_debug_button.text = "+100 %s" % label_string
game_state.currency_changed.connect(_on_currency_changed)
_on_currency_changed(_currency_id, game_state.get_currency_amount_by_id(_currency_id))