![]() |
Adventure Creator
1.77.3
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
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 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... | |
virtual void | _Update () |
virtual void | ResetTarget () |
virtual void | MoveCameraInstant () |
void | SetSplitScreen () |
void | RemoveSplitScreen () |
virtual Vector2 | GetPerspectiveOffset () |
Gets the actual horizontal and vertical panning offsets. More... | |
bool | IsActive () |
Checks if the Camera is currently the MainCamera's active camera (attachedCamera) More... | |
void | MakeActive () |
Public Attributes | |
bool | targetIsPlayer = true |
Transform | target |
bool | isDragControlled = false |
float | focalDistance = 10f |
Protected Attributes | |
Char | targetChar |
Camera | _camera |
Vector2 | inputMovement |
bool | is2D = false |
Properties | |
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] |
The base class for all Adventure Creator cameras. To integrate a custom camera script to AC, just add this component to the same object as the Camera component, and it will be visible to AC's fields, functions and Actions.
|
virtual |
Updates the camera. This is called every frame by StateHandler.
Reimplemented in AC.GameCamera, AC.GameCamera2D, AC.GameCamera2DDrag, and AC.GameCameraAnimated.
|
virtual |
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.
<return>A vector by which to tweak the camera's rotation.
Reimplemented in AC.GameCamera2D, and AC.CursorInfluenceCamera.
|
virtual |
Gets the actual horizontal and vertical panning offsets.
Reimplemented in AC.GameCamera2DDrag, AC.GameCamera2D, and AC.GameCamera25D.
|
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 in AC.GameCamera2DDrag, and AC.GameCamera2D.
bool AC._Camera.IsActive | ( | ) |
Checks if the Camera is currently the MainCamera's active camera (attachedCamera)
void AC._Camera.MakeActive | ( | ) |
Makes the Camera the MainCamera's active camera (attachedCamera)
|
virtual |
Moves the camera instantly to its destination.
Reimplemented in AC.GameCamera, AC.GameCamera2D, AC.GameCameraAnimated, and AC.GameCamera25D.
void AC._Camera.RemoveSplitScreen | ( | ) |
Removes the split-screen effect on this camera.
|
virtual |
Auto-assigns "target" as the Player prefab Transform if targetIsPlayer = True.
Reimplemented in AC.FirstPersonCamera, and AC.GameCamera25D.
void AC._Camera.SetSplitScreen | ( | ) |
Enables the camera for split-screen, using the MainCamera as the "main" part of the split, with all the data.
|
virtual |
float AC._Camera.focalDistance = 10f |
The camera's focal distance
bool AC._Camera.isDragControlled = false |
If True, then the camera can be drag-controlled (used for GameCameraThirdPerson only)
Transform AC._Camera.target |
The Transform that affects the camera's movement
bool AC._Camera.targetIsPlayer = true |
If True, the camera will move according to the Player prefab
|
get |
The Unity Camera component
|
get |
The Unity Camera's Transform
|
get |
If True, then the influence of the cursor (if any) will cause a change in position, rather than rotation
|
getset |
True if the game plays in 2D, making use of 2D colliders and raycasts
|
get |
The Transform that affects the camera's movement. If targetIsPlayer = True, this will return the Player's Transform.
|
get |
A cache of the object's transform component
|
get |
The camera's transparency sort mode. This will be copied over to the MainCamera when switched to