second commit

This commit is contained in:
2026-05-27 00:06:19 -04:00
parent a3696424d0
commit a6db45300c
9 changed files with 171 additions and 19 deletions
+11 -2
View File
@@ -3,7 +3,9 @@ using Godot;
public partial class Attack : RigidBody2D
{
public bool _hovered = false;
public int _damage = 1;
public Vector2 _speed;
public Player _playerOwner;
public override void _PhysicsProcess(double delta)
{
@@ -18,12 +20,19 @@ public partial class Attack : RigidBody2D
_speed = FORCE;
GravityScale = 1;
}
public void TakeAction(Node BODY)
{
if (BODY is Enemy enemy)
{
enemy.TakeDamage(_damage, _playerOwner);
}
}
public void OnMouseEntered(){
GD.Print("Hovered");
_hovered = true;
}
public void OnMouseExited(){
GD.Print("Not Hovered");
_hovered = true;
}
}