12 lines
188 B
GDScript
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
|
|
)
|