third commit

This commit is contained in:
2026-05-28 00:06:51 -04:00
parent a6db45300c
commit 4266625390
16 changed files with 145 additions and 46 deletions
+4 -2
View File
@@ -5,7 +5,7 @@ public partial class Attack : RigidBody2D
public bool _hovered = false;
public int _damage = 1;
public Vector2 _speed;
public Player _playerOwner;
public Commander _commanderOwner;
public override void _PhysicsProcess(double delta)
{
@@ -23,9 +23,11 @@ public partial class Attack : RigidBody2D
public void TakeAction(Node BODY)
{
GD.Print("Body Entered");
if (BODY is Enemy enemy)
{
enemy.TakeDamage(_damage, _playerOwner);
GD.Print("Body Entered is enemy");
enemy.TakeDamage(_damage, _commanderOwner);
}
}