Updated weapon logic. Fixed player CheckMove logic.

This commit is contained in:
2026-08-24 19:46:04 -04:00
parent c1124a784d
commit e42b11c6fc
10 changed files with 279 additions and 73 deletions

View File

@@ -19,6 +19,10 @@ public abstract class Mine : MoveableSprite
protected float RotationSpeed { get; set; } = 1.5f;
protected double DistanceToPlayer { get; set; } = double.MaxValue;
private MineState State { get; set; } = MineState.Drifting;
private Vector2? CurrentTarget { get; set; }
public Mine(int x, int y) : base(x, y)
{
Origin = new(30, 33);
@@ -77,6 +81,19 @@ public abstract class Mine : MoveableSprite
}
Rotation = MathHelper.WrapAngle(Rotation + RotationSpeed * context.DeltaTime);
switch (State)
{
case MineState:
default:
break;
}
}
protected void Charge(Vector2 target)
{
State = MineState.Charging;
CurrentTarget = target;
}
private void UpdateDistanceToPlayer(SpriteUpdateContext context)