Update stuff
This commit is contained in:
@@ -5,14 +5,15 @@ public partial class GodCircuit : Node3D
|
||||
[Export]
|
||||
private AnimationPlayer _animationPlayer;
|
||||
|
||||
[Signal]
|
||||
public delegate void OnEnemyBossHitEventHandler(long damage);
|
||||
|
||||
private void OnHit(Node3D node)
|
||||
{
|
||||
GD.Print("Hit");
|
||||
_animationPlayer.Play("OnHit");
|
||||
var hpComponent = GetNode<HealthPoints>("HP Component");
|
||||
hpComponent.TakeDamage(800000);
|
||||
hpComponent.UpdateHealthbar();
|
||||
if (hpComponent.CurrentHP <= 0)
|
||||
QueueFree();
|
||||
EmitSignal(SignalName.OnEnemyBossHit, hpComponent.CurrentHP);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user