pirate-survivors/Player/hud.gd
Florian GOLESTIN 9028ec47cc initial commit
2026-01-17 14:36:11 +01:00

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)