add gamemanager class and score
This commit is contained in:
9
scripts/game_manager.gd
Normal file
9
scripts/game_manager.gd
Normal file
@@ -0,0 +1,9 @@
|
||||
extends Node
|
||||
|
||||
var score = 0
|
||||
|
||||
@onready var score_label: Label = $ScoreLabel
|
||||
|
||||
func add_point():
|
||||
score += 1
|
||||
score_label.text = "You collected " + str(score) + " coins! :)"
|
||||
Reference in New Issue
Block a user