Boss orbs

This commit is contained in:
2023-09-12 11:58:58 -07:00
parent 37180e2def
commit 7599d3a665
8 changed files with 201 additions and 28 deletions

View File

@@ -22,6 +22,20 @@ public partial class GodCircuit : Node3D
var hpComponent = GetNode<HealthPoints>("HP Component");
hpComponent.TakeDamage(800000);
EmitSignal(SignalName.OnEnemyBossHit, hpComponent.CurrentHP);
if (hpComponent.CurrentHP <= 0)
QueueFree();
}
}
private void OnBossOrbDestroyed()
{
var hpComponent = GetNode<HealthPoints>("HP Component");
_animationPlayer.Play("OnHit");
hpComponent.TakeDamage(30000000);
EmitSignal(SignalName.OnEnemyBossHit, hpComponent.CurrentHP);
if (hpComponent.CurrentHP <= 0)
hpComponent.CurrentHP = 1;
}
}