Ctrl+K

CameraComponent

Declaration

public class Strawberry.Components.Rendering.CameraComponent

Inherits: Strawberry.Core.BaseComponent

Properties

ViewportName

The name of the viewport this camera moves. (Default is "Default")

string ViewportName { get set }

Border

The border at which the viewport starts following the target, in pixels from the edge of the screen (Default is 32, 32)

Vector2 Border { get set }

Speed

The speed of the camera, if it is not centered on its target, if x or y is set -1 the camera will jump to the target instantly. (Default is -1, -1)

Vector2 Speed { get set }

Center

Gets or sets whether the camera should center on its target or not, if true Border and Speed are ignored.

bool Center { get set }

Methods

OnComponentAdded override

void OnComponentAdded(BaseComponent component)

Parameters:

Name Type Description
component Strawberry.Core.BaseComponent

OnUpdate override

void OnUpdate()