18 lines
390 B
C#
18 lines
390 B
C#
using Godot;
|
|
|
|
public partial class EnemyBullet : Projectile
|
|
{
|
|
public new void OnProjectileHit(Node node)
|
|
{
|
|
SetPhysicsProcess(false);
|
|
|
|
if (node is Character character && character.HasMethod(Character.MethodName.OnHit))
|
|
{
|
|
GD.Print("Player hit: " + character.Name);
|
|
character.Call(Character.MethodName.OnHit, this);
|
|
}
|
|
|
|
QueueFree();
|
|
}
|
|
}
|