Bombs game ending, and debugging.
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user