This commit is contained in:
2023-09-11 17:42:11 -07:00
parent ba9c1e320e
commit 4d8fbda71b
21 changed files with 123 additions and 67 deletions

View File

@@ -2,12 +2,6 @@ using Godot;
public partial class EnemyBullet : Projectile
{
public override void _PhysicsProcess(double delta)
{
TranslateObjectLocal(new Vector3(0, 0, -Speed * (float)delta));
}
public new void OnProjectileHit(Node node)
{
SetPhysicsProcess(false);
@@ -15,7 +9,7 @@ public partial class EnemyBullet : Projectile
if (node is Character character && character.HasMethod(Character.MethodName.OnHit))
{
GD.Print("Player hit: " + character.Name);
character.Call(Character.MethodName.OnHit, node);
character.Call(Character.MethodName.OnHit, this);
}
QueueFree();