Class Camera
Represents a 2D camera that defines the viewable area of the game world.
public class Camera
- Inheritance
-
Camera
- Inherited Members
Remarks
The camera centers the view on a given world position.
Constructors
Camera()
Initializes a new instance of the Camera class centered at (0,0).
public Camera()
Properties
BackgroundColor
Gets or sets the background color used when clearing the screen. Default is Blue.
public Color BackgroundColor { get; set; }
Property Value
- Color
Position
Gets or sets the world position that the camera is at.
public Vector2 Position { get; set; }
Property Value
- Vector2
Remarks
Setting this value automatically recalculates the Transform matrix.
Transform
Gets the transformation matrix used for rendering.
public Matrix Transform { get; }
Property Value
- Matrix