spawnable tests and hpbar for bebittes

This commit is contained in:
Victor Turgeon
2023-10-10 20:26:50 -04:00
parent d518691cea
commit 660c13980f
13 changed files with 113 additions and 20 deletions

View File

@@ -95,6 +95,7 @@ func receive_damage(dmg):
spawnableUI.setHP(currentHp, maxHp)
func die():
enemy.remove_foe(self)
bodyCollision.disabled = true
damageCollision.disabled = true
spawnableUI.visible = false
@@ -103,7 +104,6 @@ func die():
animatedSprite.play("death")
animatedSprite.disconnect("animation_finished", endAttack)
animatedSprite.connect("animation_finished", fadeOut)
enemy.remove_foe(self)
func fadeOut():
var tween = get_tree().create_tween()