20 lines
470 B
C#
20 lines
470 B
C#
using Godot;
|
|
|
|
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);
|
|
EmitSignal(SignalName.OnEnemyBossHit, hpComponent.CurrentHP);
|
|
}
|
|
}
|