blob: b185cda4126fc829baad596343961b2eaf6be0de (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
extends Label
func _ready():
GameData.connect("life_changed", Callable(self, "_on_life_changed"))
update_label(GameData.get_life())
func _on_life_changed(new_life: int) -> void:
update_label(new_life)
func update_label(new_life: int) -> void:
text = "Life:" + str(new_life)
|