Progress check-in to laptop

This commit is contained in:
2023-09-10 19:49:59 -07:00
parent ed28a4bb70
commit ebf9f6c117
18 changed files with 806 additions and 241 deletions

View File

@@ -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);
}
}
}