C# Class GameEngine.Camera

Represents a camera to manage viewing information Should be attached to a GameObject --- Incomplete --- 1. Make it work for both perspective and orthographic cameras 2. Use other methods (off-center cameras)
Inheritance: GameEngine.Component
Mostra file Open project: Kursledare/Mookieraw Class Usage Examples

Public Properties

Property Type Description
DisplayCanvas Canvas

Public Methods

Method Description
Action ( ) : void
Camera ( Canvas displayCanvas, GameManager gameManager ) : System.Windows.Controls
PointToWorldPosition ( Point point ) : Vector2
RefreshScreen ( ) : void
WorldPositionToPoint ( Vector2 vector ) : Point

Private Methods

Method Description
IsVectorInScreen ( Vector2 pos ) : bool
RemoveUnregisteredGameObjectsFromCanvas ( IGameObject gameObject ) : void

Method Details

Action() public method

public Action ( ) : void
return void

Camera() public method

public Camera ( Canvas displayCanvas, GameManager gameManager ) : System.Windows.Controls
displayCanvas Canvas
gameManager GameManager
return System.Windows.Controls

PointToWorldPosition() public method

public PointToWorldPosition ( Point point ) : Vector2
point Point
return Vector2

RefreshScreen() public method

public RefreshScreen ( ) : void
return void

WorldPositionToPoint() public method

public WorldPositionToPoint ( Vector2 vector ) : Point
vector Vector2
return Point

Property Details

DisplayCanvas public_oe static_oe property

public static Canvas DisplayCanvas
return Canvas