public void Update(GameTime gameTime, KeyboardState keyboard, object none)
{
float elapsedTime = (float)gameTime.ElapsedGameTime.TotalSeconds;
float moveSpeed = (float)moveAmount * elapsedTime;
drawTranslation = drawPosition - position;
if (RightDown(keyboard))
{
rotation += rotationSpeed;
}
else if (LeftDown(keyboard))
{
rotation -= rotationSpeed;
}
UpdateDirection(Rotation, RotationOffset, keyboard);
velocity += acceleration * direction * elapsedTime;
if (velocity.LengthSquared() > maxSpeed * maxSpeed)
{
velocity.Normalize();
velocity *= maxSpeed;
}
position += velocity;
for (int i = 0; i < anchorPoints.Count; i++)
{
//anchorPoints[i] += velocity;
}
velocity *= friction;
destRect.X = (int)position.X;
destRect.Y = (int)position.Y;
engineAnimation.Update(gameTime, keyboard, this);
}