16 lines
501 B
GDScript
16 lines
501 B
GDScript
extends Label
|
|
|
|
func _ready() -> void:
|
|
EventBus.tower_count_changed.connect(_on_EventBus_tower_count_changed)
|
|
EventBus.team_in_action_changed.connect(_on_EventBus_team_in_action_changed)
|
|
|
|
|
|
func _on_EventBus_tower_count_changed(_value : int) -> void:
|
|
var _text = text.rsplit("/")
|
|
_text[1] = str(_value)
|
|
text = _text[0] + "/" + _text[1]
|
|
|
|
func _on_EventBus_team_in_action_changed(_value : Array) -> void:
|
|
var _text = text.rsplit("/")
|
|
_text[0] = str(_value.size())
|
|
text = _text[0] + "/" + _text[1]
|