This commit is contained in:
dan
2025-03-22 20:21:52 -04:00
commit ea36511c71
63 changed files with 1992 additions and 0 deletions

6
globals/GameManager.tscn Normal file
View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dw81sskevybfe"]
[ext_resource type="Script" uid="uid://bevcjiuvoyb6u" path="res://globals/game_manager.gd" id="1_f5sja"]
[node name="GameManager" type="Node"]
script = ExtResource("1_f5sja")

View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dw81sskevybfe"]
[ext_resource type="Script" uid="uid://bevcjiuvoyb6u" path="res://globals/game_manager.gd" id="1_f5sja"]
[node name="GameManager" type="Node"]
script = ExtResource("1_f5sja")

14
globals/game_manager.gd Normal file
View File

@@ -0,0 +1,14 @@
extends Node
var score: int = 0
var sl = null
func set_label(label:Label):
score = 0
sl = label
func add_point():
score+=1
sl.text ="You got " + str(score) + " coins"
print(score)

View File

@@ -0,0 +1 @@
uid://bevcjiuvoyb6u