road-rage-tank/player/score_label.gd

12 lines
188 B
GDScript

extends Label
var score := 0:
set(v):
score = v
text = "Score: %d" % v
func _ready() -> void:
score = score
SignalBus.building_destroyed.connect(func(_building):
score += 10
)