test_game/scripts/game_manager.gd

13 lines
224 B
GDScript3
Raw Normal View History

2025-02-27 23:50:12 +01:00
extends Node
@onready var score_label: Label = $ScoreLabel
2025-03-03 02:03:38 +01:00
@onready var ui: UI = %UI
2025-02-27 23:50:12 +01:00
var score: int = 0
func add_score_point():
score += 1
score_label.text = "You collected " + str(score) + " coins."
2025-03-03 02:03:38 +01:00
ui.coins = score