Re-enable collisions

This commit is contained in:
Steven Long
2023-09-07 23:28:00 -07:00
parent 8e363587b9
commit 5362240120
9 changed files with 36 additions and 78 deletions

View File

@@ -41,13 +41,14 @@ public partial class Projectile : Node3D
SetProcess(false);
if (node.GetParent() is BasicEnemy basicEnemy && basicEnemy.HasMethod(BasicEnemy.MethodName.OnEnemyHit))
basicEnemy.Call(BasicEnemy.MethodName.OnEnemyHit, node);
else
GD.Print("Hit something other than enemy: " + node.GetParent().Name);
else
GD.Print("Hit something other than enemy: " + node.Name);
_hitBox.QueueFree();
var sfxPlayer = GetTree().Root.GetNode<AudioStreamPlayer>("Main/SFXPlayer");
if (!sfxPlayer.Playing)
sfxPlayer.Play();
sfxPlayer.Play();
}
public float Speed { get; private set; }