JetCamera

JetCamera allows you to have the camera track the player (or another actor), and it will stay within the specified boundaries of a scene. It also gives you access to screen shake effects and to easy parallax scrolling.

Public Methods

public void SetPosition(Vector2 position)

Sets the position of the camera. If this is called on the main camera, it will also update the position of every secondary camera.

public void SetFocusObject(JetActor _focusObject)

Sets the JetActor that the camera focuses on and follows.

Public Members

public Camera camera

The attached UnityEngine Camera rendering the scene. This will default to Camera.main if nothing else is slotted.

public JetActor focusObject

The object the camera will focus on and follow.

public Camera foregroundCamera

The attached UnityEngine Camera used to render the Foreground layer. Primarily used for parallax. Can be left blank.

public Camera midgroundCamera

The attached UnityEngine Camera used to render the Midground layer. Primarily used for parallax. Can be left blank.

public Camera backgroundCamera

The attached UnityEngine Camera used to render the Background layer. Primarily used for parallax. Can be left blank.

public Camera backgroundFarCamera

The attached UnityEngine Camera used to render the BackgroundFar layer. Primarily used for parallax. Can be left blank.

public bool willTrackFocusObject

Whether or not the camera will track and follow the target set under focusObject.

public bool willScrollHorizontally

Whether or not the camera will scroll horizontally.

public bool willScrollVertically

Whether or not the camera will scroll vertically.
public ScrollProperties scrolling