Bombs game ending, and debugging.

This commit is contained in:
2025-03-13 22:52:39 +01:00
parent 183f575160
commit d701893663
13 changed files with 237 additions and 5 deletions

View File

@ -5,8 +5,12 @@ extends Panel
@onready var stickspawner: Button = $HBoxContainer4/HBoxContainer4/Button2
const STICK_TRAP = preload("res://Game/Traps/stick_trap.tscn")
@onready var minespawner: Button = $HBoxContainer4/HBoxContainer4/Button3
const MINE = preload("res://Game/Traps/mine.tscn")
func _ready() -> void:
stickspawner.connect("button_up", Spawn_Stick)
minespawner.connect("button_up", Spawn_Mine)
func Update_Lives(lives) -> void:
livelabel.text = "Lives: " + str(lives)
@ -15,3 +19,8 @@ func Spawn_Stick() -> void:
var stick = STICK_TRAP.instantiate()
stick.name = "StickTrap-" + str(randi())
get_parent().add_child(stick)
func Spawn_Mine() -> void:
var mine = MINE.instantiate()
mine.name = "Mine-" + str(randi())
get_parent().add_child(mine)