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