11 lines
280 B
GDScript
11 lines
280 B
GDScript
extends MarginContainer
|
|
|
|
onready var lap_counter = get_node("Laps/Value")
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
Global.connect("laps_changed", self, "_on_lap_completed")
|
|
|
|
func _on_lap_completed(laps):
|
|
lap_counter.set_text("%d" % laps)
|