First trap initialized!
This commit is contained in:
@ -10,6 +10,10 @@ const enemies = [FORKMAN, COBOLD, ORK]
|
||||
|
||||
var lives = 20
|
||||
|
||||
func _ready() -> void:
|
||||
get_node("SidePanel").Update_Lives(lives)
|
||||
|
||||
|
||||
func _on_timer_timeout() -> void:
|
||||
spawnMonster()
|
||||
|
||||
@ -22,7 +26,7 @@ func spawnMonster():
|
||||
|
||||
func decrease_life(damage) -> void:
|
||||
lives -= damage
|
||||
print(lives)
|
||||
get_node("SidePanel").Update_Lives(lives)
|
||||
if lives == 0:
|
||||
print("DEAD")
|
||||
|
||||
|
Reference in New Issue
Block a user