using Godot; public partial class GodCircuit : Node3D { [Export] private AnimationPlayer _animationPlayer; [Signal] public delegate void OnEnemyBossHitEventHandler(long damage); private void OnHit(Node3D node) { if (node is Character character && character.HasMethod(Character.MethodName.OnHit)) { GD.Print("Player hit: " + character.Name); character.Call(Character.MethodName.OnHit, node); } else { GD.Print("Hit"); _animationPlayer.Play("OnHit"); var hpComponent = GetNode("HP Component"); hpComponent.TakeDamage(800000); EmitSignal(SignalName.OnEnemyBossHit, hpComponent.CurrentHP); } } }