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

@ -8,7 +8,7 @@ const COBOLD = preload("res://Game/Mobs/cobold.tscn")
const enemies = [FORKMAN, COBOLD, ORK]
var lives = 20
var lives = 2
func _ready() -> void:
get_node("SidePanel").Update_Lives(lives)
@ -28,5 +28,12 @@ func decrease_life(damage) -> void:
lives -= damage
get_node("SidePanel").Update_Lives(lives)
if lives == 0:
print("DEAD")
game_over()
func game_over()-> void:
get_node("Timer").stop()
var enemy = get_node("Path2D").get_children()
for i in enemy:
i.get_children()[0].set_process(false)
i.get_children()[0].name