diff --git a/MLEM/Cameras/Camera.cs b/MLEM/Cameras/Camera.cs index 3800e56..f84f292 100644 --- a/MLEM/Cameras/Camera.cs +++ b/MLEM/Cameras/Camera.cs @@ -23,7 +23,6 @@ namespace MLEM.Cameras { get => this.scale; set => this.scale = MathHelper.Clamp(value, this.MinScale, this.MaxScale); } - private float scale = 1; /// /// The minimum that the camera can have /// @@ -79,11 +78,15 @@ namespace MLEM.Cameras { get => this.Position + this.ScaledViewport / 2; set => this.Position = value - this.ScaledViewport / 2; } - private Rectangle Viewport => this.graphicsDevice.Viewport.Bounds; - private Vector2 ScaledViewport => new Vector2(this.Viewport.Width, this.Viewport.Height) / this.ActualScale; + /// + /// The viewport of this camera, based on the game's and this camera's + /// + public Vector2 ScaledViewport => new Vector2(this.Viewport.Width, this.Viewport.Height) / this.ActualScale; + private Rectangle Viewport => this.graphicsDevice.Viewport.Bounds; private readonly bool roundPosition; private readonly GraphicsDevice graphicsDevice; + private float scale = 1; /// /// Creates a new camera.