19 lines
451 B
GDScript
19 lines
451 B
GDScript
extends CanvasLayer
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
pass # Replace with function body.
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(_delta: float) -> void:
|
|
#var player = get_parent().get_node("player")
|
|
var player = get_parent()
|
|
update_score(player.score)
|
|
|
|
|
|
|
|
func update_score(score: int) -> void:
|
|
$ScoreLabel.text = "Score: " + str(score)
|