updating movement and added a bucket, still some clean up to do on movement. TODO: if enemy becomes stuck, reclculate path.

This commit is contained in:
2026-06-05 03:48:07 -04:00
parent 0cbc6cbfc7
commit 12b565715a
19 changed files with 360 additions and 46 deletions
+8 -1
View File
@@ -5,6 +5,8 @@ public partial class Attack : RigidBody2D
{
[Signal]
public delegate void HitEventHandler(Node NODE);
[Signal]
public delegate void BucketEnteredEventHandler();
public bool _hovered = false;
public int _damage = 1;
@@ -15,6 +17,7 @@ public partial class Attack : RigidBody2D
public override void _Ready()
{
base._Ready();
_predictionPath = GetNode<Path2D>("PredictedPath");
}
@@ -35,10 +38,14 @@ public partial class Attack : RigidBody2D
_predictionPath.Curve.AddPoint(POINTS[i]);
}
}
public void EnteredBucket()
{
EmitSignal(SignalName.BucketEntered);
}
public void Shoot(Vector2 FORCE){
_speed = FORCE;
// Set("velocity", FORCE);
GravityScale = 1;
}