This commit is contained in:
pennyrigate 2025-12-30 19:32:51 -05:00
parent a6421235f8
commit d729c0a7a3
14 changed files with 187 additions and 2 deletions

24
globals/currentgame.gd Normal file
View file

@ -0,0 +1,24 @@
extends Node
@export var score = 0
@export var graze = 0
@export var level_graze = 0
@export var lives = 2
@export var bombs = 3
func change_score(amount):
score += amount
Hud.score_label = str("SCORE: ") + str(score)
func change_graze(amount):
graze += amount
level_graze += amount
Hud.graze_label = str("GRAZE: ") + str(level_graze)
func change_lives(amount):
lives += amount
Hud.lives_label = str("GRAZE: ") + str(lives)
func change_bombs(amount):
bombs += amount
Hud.bombs_label = str("GRAZE: ") + str(bombs)

View file

@ -0,0 +1 @@
uid://4lh6pskiiq1c

6
globals/currentgame.tscn Normal file
View file

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://yibsx87q42c1"]
[ext_resource type="Script" uid="uid://4lh6pskiiq1c" path="res://globals/currentgame.gd" id="1_0tn8j"]
[node name="CurrentGame" type="Node"]
script = ExtResource("1_0tn8j")