game_manager.gd
1 extends Node 2 3 4 var score = 0 5 6 @onready var score_label: Label = $ScoreLabel 7 8 9 func add_point(): 10 score = score + 1 11 print("you have " ,score, " coins") 12 score_label.text = "You collected " + str(score) + " coins."