basic primitive batch progress.
This commit is contained in:
@@ -12,7 +12,7 @@ namespace RecrownedAthenaeum.Camera
|
||||
{
|
||||
public float Zoom;
|
||||
public Vector2 Position;
|
||||
public Matrix TransformMatrix { get; private set; }
|
||||
public Matrix Matrix { get; private set; }
|
||||
public GraphicsDevice graphicsDevice;
|
||||
|
||||
public Camera2D(GraphicsDevice graphicsDevice)
|
||||
@@ -26,7 +26,7 @@ namespace RecrownedAthenaeum.Camera
|
||||
public void Update()
|
||||
{
|
||||
Rectangle bounds = graphicsDevice.Viewport.Bounds;
|
||||
TransformMatrix =
|
||||
Matrix =
|
||||
Matrix.CreateTranslation(new Vector3(-Position.X, -Position.Y, 0)) *
|
||||
Matrix.CreateScale(Zoom) *
|
||||
Matrix.CreateTranslation(new Vector3(bounds.Width * 0.5f, bounds.Height * 0.5f, 0f));
|
||||
|
Reference in New Issue
Block a user