C# Class PantheonPrototype.Camera

The class that contains all of the information for the camera's rotation, position, zoom, and related.
Mostrar archivo Open project: Bacon41/PantheonPrototype Class Usage Examples

Public Properties

Property Type Description
Position Vector2
Transform Matrix

Protected Properties

Property Type Description
rotation float
zoom float

Public Methods

Method Description
Camera ( int w, int h ) : System

The constructor that reads in the initial camera frame size and initializes the other information.

Move ( Vector2 offset ) : void

An additional way to move the camera.

getTransformation ( ) : Matrix

The method to get the matrix that is the transformed screen based on zooms, shifts, rotations, and the like.

Method Details

Camera() public method

The constructor that reads in the initial camera frame size and initializes the other information.
public Camera ( int w, int h ) : System
w int Screen width.
h int Screen height.
return System

Move() public method

An additional way to move the camera.
public Move ( Vector2 offset ) : void
offset Vector2 The offest for the camera
return void

getTransformation() public method

The method to get the matrix that is the transformed screen based on zooms, shifts, rotations, and the like.
public getTransformation ( ) : Matrix
return Matrix

Property Details

Position public_oe property

public Vector2 Position
return Vector2

Transform public_oe property

public Matrix Transform
return Matrix

rotation protected_oe property

protected float rotation
return float

zoom protected_oe property

protected float zoom
return float