![]() |
Adventure Creator
1.76.2
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
override void | _Update () |
override bool | Is2D () |
Checks if the camera is for 2D games. This is necessary for working out if the MainCamera needs to change its projection matrix. More... | |
override Vector2 | GetPerspectiveOffset () |
Gets the actual horizontal and vertical panning offsets. More... | |
void | SetPosition (Vector2 _position) |
Sets the position to a specific point. This does not account for the offset, minimum or maximum values. More... | |
Vector2 | GetPosition () |
Gets the camera's position, relative to its original position. More... | |
![]() | |
virtual Vector2 | CreateRotationOffset () |
Returns a vector by which to tweak the camera's rotation. The x-axis will control the spin, and the y-axis will control the pitch. More... | |
virtual void | SwitchTarget (Transform _target) |
Switches the camera's target. More... | |
virtual void | ResetTarget () |
virtual void | MoveCameraInstant () |
void | SetSplitScreen () |
void | RemoveSplitScreen () |
bool | IsActive () |
Checks if the Camera is currently the MainCamera's active camera (attachedCamera) More... | |
void | MakeActive () |
Public Attributes | |
RotationLock | xLock |
RotationLock | yLock |
float | xSpeed = 5f |
float | ySpeed = 5f |
float | xAcceleration = 5f |
float | xDeceleration = 5f |
float | yAcceleration = 5f |
float | yDeceleration = 5f |
bool | invertX |
bool | invertY |
float | minX |
float | maxX |
float | minY |
float | maxY |
float | xOffset |
float | yOffset |
SpriteRenderer | backgroundConstraint = null |
bool | autoScaleToFitBackgroundConstraint = false |
![]() | |
bool | targetIsPlayer = true |
Transform | target |
bool | isDragControlled = false |
float | focalDistance = 10f |
Protected Member Functions | |
override void | Awake () |
override void | OnEnable () |
override void | OnDisable () |
virtual Vector2 | GetInputVector () |
void | SetProjection () |
void | SetOriginalPosition () |
void | UpdateBackgroundConstraint () |
void | OnUpdatePlayableScreenArea () |
![]() | |
virtual void | Start () |
Vector3 | PositionRelativeToCamera (Vector3 _position) |
Vector3 | RightVector () |
Vector3 | ForwardVector () |
float | ConstrainAxis (float desired, Vector2 range, bool isAngle=false) |
Protected Attributes | |
float | deltaX |
float | deltaY |
float | xPos |
float | yPos |
Vector2 | perspectiveOffset |
Vector3 | originalPosition |
bool | _is2D |
Vector2 | lastMousePosition |
Vector2 | noInput = Vector2.zero |
![]() | |
Char | targetChar |
Camera | _camera |
Vector2 | inputMovement |
bool | is2D = false |
Additional Inherited Members | |
![]() | |
Transform | Target [get] |
Transform | CameraTransform [get] |
Transform | Transform [get] |
Camera | Camera [get] |
bool | isFor2D [get, set] |
virtual TransparencySortMode | TransparencySortMode [get] |
Vector3 | TargetForward [get] |
virtual bool | CursorOffsetForcesTranslation [get] |
|
virtual |
Updates the camera. This is called every frame by StateHandler.
Reimplemented from AC._Camera.
|
virtual |
Gets the actual horizontal and vertical panning offsets.
Reimplemented from AC._Camera.
Vector2 AC.GameCamera2DDrag.GetPosition | ( | ) |
Gets the camera's position, relative to its original position.
|
virtual |
Checks if the camera is for 2D games. This is necessary for working out if the MainCamera needs to change its projection matrix.
Reimplemented from AC._Camera.
void AC.GameCamera2DDrag.SetPosition | ( | Vector2 | _position | ) |
Sets the position to a specific point. This does not account for the offset, minimum or maximum values.
_position | The new position for the camera |
bool AC.GameCamera2DDrag.autoScaleToFitBackgroundConstraint = false |
If True, and backgroundConstraint is set, then the camera will zoom in to fit the background if it is too zoomed out to fit
SpriteRenderer AC.GameCamera2DDrag.backgroundConstraint = null |
If set, then the sprite's bounds will be used to set the horizontal and vertical limits, overriding constrainHorizontal and constrainVertical
bool AC.GameCamera2DDrag.invertX |
If True, then X movement will be inverted
bool AC.GameCamera2DDrag.invertY |
If True, then Y movement will be inverted
float AC.GameCamera2DDrag.maxX |
The maximum X value, if xLock = RotationLock.Limited
float AC.GameCamera2DDrag.maxY |
The maximum Y value, if yLock = RotationLock.Limited
float AC.GameCamera2DDrag.minX |
The minimum X value, if xLock = RotationLock.Limited
float AC.GameCamera2DDrag.minY |
The minimum Y value, if yLock = RotationLock.Limited
float AC.GameCamera2DDrag.xAcceleration = 5f |
The acceleration of X movement
float AC.GameCamera2DDrag.xDeceleration = 5f |
The deceleration of X movement
RotationLock AC.GameCamera2DDrag.xLock |
How X movement is affected (Free, Limited, Locked)
float AC.GameCamera2DDrag.xOffset |
The X offset
float AC.GameCamera2DDrag.xSpeed = 5f |
The speed of X movement
float AC.GameCamera2DDrag.yAcceleration = 5f |
The acceleration of Y movement
float AC.GameCamera2DDrag.yDeceleration = 5f |
The deceleration of Y movement
RotationLock AC.GameCamera2DDrag.yLock |
How Y movement is affected (Free, Limited, Locked)
float AC.GameCamera2DDrag.yOffset |
The Y offset
float AC.GameCamera2DDrag.ySpeed = 5f |
The speed of Y movement