gover man!

This commit is contained in:
pennyrigate 2025-12-31 17:29:49 -05:00
parent 55059788b2
commit 81b01b7508
8 changed files with 185 additions and 36 deletions

View file

@ -6,19 +6,30 @@ extends Node
@export var lives = 2
@export var bombs = 3
#func _process(delta: float) -> void:
#print(Display.current_scene)
func change_score(amount):
score += amount
Hud.score_label = str("SCORE: ") + str(score)
Hud.score_label.text = str("SCORE: ") + str(score)
func change_graze(amount):
graze += amount
level_graze += amount
Hud.graze_label = str("GRAZE: ") + str(level_graze)
Hud.graze_label.text = str("GRAZE: ") + str(level_graze)
func change_lives(amount):
lives += amount
Hud.lives_label = str("LIVES: ") + str(lives)
lives = clamp(lives,-1,9)
Hud.lives_label.text = str("LIVES: ") + str(lives)
if lives < 0:
Hud.lives_label.text = str("LIVES: ") + str(0)
var Gover = load("res://menus/game_over.tscn")
var gover = Gover.instantiate()
#TODO implement properly
get_tree().paused = true
Display.viewport.add_child(gover)
func change_bombs(amount):
bombs += amount
Hud.bombs_label = str("BOMB: ") + str(bombs)
Hud.bombs_label.text = str("BOMB: ") + str(bombs)