book and page now use the new camera system; added functionality to camera; progress on mainscreen;
This commit is contained in:
@@ -31,5 +31,12 @@ namespace RhythmBullet.Zer01HD.Utilities.Camera
|
||||
Matrix.CreateScale(Zoom) *
|
||||
Matrix.CreateTranslation(new Vector3(bounds.Width * 0.5f, bounds.Height * 0.5f, 0f));
|
||||
}
|
||||
|
||||
public void LinearInterpolationToPosition(float alpha, Vector2 targetPosition)
|
||||
{
|
||||
if (alpha < 0 && alpha > 1f) throw new ArgumentException("Alpha can't be greater than 1f, or less than 0.");
|
||||
Position.X = MathHelper.Lerp(Position.X, targetPosition.X, alpha);
|
||||
Position.Y = MathHelper.Lerp(Position.Y, targetPosition.Y, alpha);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user