basic primitive batch progress.

This commit is contained in:
2019-01-11 22:09:42 -06:00
parent 74a9ff74b2
commit ec62b81a12
5 changed files with 123 additions and 6 deletions

View File

@@ -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));