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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user