public override void Update(State s, Room room)
{
base.Update(s, room);
Vector2 direction = new Vector2((float)((TargetX - x) * (DiverGame.Random.NextDouble() * 0.2f + 0.8f)),
(float)((TargetY - y) * (DiverGame.Random.NextDouble() * 0.2f + 0.8f)));
if(direction.LengthSquared() > 0)
direction.Normalize();
speedX += direction.X * 0.007f;
speedY += direction.Y * 0.007f;
speedX *= 0.999f;
speedY *= 0.999f;
float speed = (float)Math.Sqrt(speedX * speedX + speedY * speedY);
animationGridFrame += speed * 0.25f + 0.03f;
x += speedX;
y += speedY;
X = (int)x;
Y = (int)y;
float desiredRot = (float)Math.Atan2(speedX, -speedY) - (float)Math.PI / 2f;
float rotDiff = desiredRot - rotation;
while (rotDiff > MathHelper.Pi) rotDiff -= MathHelper.TwoPi;
while (rotDiff < -MathHelper.Pi) rotDiff += MathHelper.TwoPi;
rotation += rotDiff * 0.1f;
}