idk dude
This commit is contained in:
@@ -26,11 +26,11 @@ public partial class BasicEnemy : Node3D
|
||||
|
||||
public void OnPlayerHit(Node3D node)
|
||||
{
|
||||
GD.Print("Collision with player");
|
||||
if (node is Character character && character.HasMethod(Character.MethodName.OnHit))
|
||||
{
|
||||
GD.Print("Collision with player at " + node.GlobalPosition + "by " + Name);
|
||||
GD.Print("Player hit: " + character.Name);
|
||||
character.Call(Character.MethodName.OnHit, node);
|
||||
character.Call(Character.MethodName.OnHit, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user