Fix flow
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user