Progress check-in to laptop
This commit is contained in:
@@ -23,4 +23,14 @@ public partial class BasicEnemy : Node3D
|
||||
QueueFree();
|
||||
}
|
||||
}
|
||||
|
||||
public void OnPlayerHit(Node3D node)
|
||||
{
|
||||
GD.Print("Collision with player");
|
||||
if (node is Character character && character.HasMethod(Character.MethodName.OnHit))
|
||||
{
|
||||
GD.Print("Player hit: " + character.Name);
|
||||
character.Call(Character.MethodName.OnHit, node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user