gover man!
This commit is contained in:
parent
55059788b2
commit
81b01b7508
8 changed files with 185 additions and 36 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -3,4 +3,5 @@
|
|||
[ext_resource type="Script" uid="uid://4lh6pskiiq1c" path="res://globals/currentgame.gd" id="1_0tn8j"]
|
||||
|
||||
[node name="CurrentGame" type="Node"]
|
||||
process_mode = 3
|
||||
script = ExtResource("1_0tn8j")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue