Adventure Creator
1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
virtual void | UpdateMovement () |
virtual void | _FixedUpdate () |
bool | IsOn (bool accountForCamera=false) |
void | TurnOn () |
void | TurnOn (bool manualSet) |
Makes the object interactive. More... | |
void | TurnOff () |
void | TurnOff (bool manualSet) |
Disables the Hotspot. More... | |
virtual bool | CanToggleCursor () |
virtual void | DrawGrabIcon () |
virtual void | Grab (Vector3 grabPosition) |
Attaches the object to the player's control. More... | |
virtual void | LetGo (bool ignoreInteractions=false) |
bool | CanGrab () |
bool | IsOnScreen () |
Checks if the the point of contact is visible on-screen. More... | |
bool | IsCloseToCamera (float maxDistance) |
Checks if the point of contact is close enough to the camera to continue being held. More... | |
virtual void | ApplyDragForce (Vector3 force, Vector3 mousePosition, float distanceToCamera) |
Applies a drag force on the object, based on the movement of the cursor. More... | |
bool | PlayerIsWithinBoundary () |
Checks if the Player is within the draggables's interactableBoundary, if assigned. More... | |
Vector3 | GetGrabPosition () |
Gets the point of contact on the object, once grabbed. More... | |
Public Member Functions inherited from AC.Moveable | |
void | StopMoving () |
bool | IsMoving (TransformType transformType) |
bool | IsMoving () |
void | EndMovement () |
void | Move (Vector3 _newVector, MoveMethod _moveMethod, bool _inWorldSpace, float _transitionTime, TransformType _transformType, bool _doEulerRotation, AnimationCurve _timeCurve, bool clearExisting) |
Moves the GameObject by referencing a Vector3 as its target Transform. More... | |
void | Move (Marker _marker, MoveMethod _moveMethod, bool _inWorldSpace, float _transitionTime, AnimationCurve _timeCurve) |
Moves the GameObject by referencing a Marker component as its target Transform. More... | |
MoveableData | SaveData (MoveableData saveData) |
Updates a MoveableData class with its own variables that need saving. More... | |
void | LoadData (MoveableData saveData) |
Updates its own variables from a MoveableData class. More... | |
Vector3 | GetTargetPosition () |
Public Attributes | |
InteractiveBoundary | interactiveBoundary |
_Camera | limitToCamera = null |
bool | invertInput = false |
float | maxSpeed = 200f |
float | playerMovementReductionFactor = 0f |
float | playerMovementInfluence = 1f |
bool | allowZooming = false |
float | zoomSpeed = 60f |
float | minZoom = 1f |
float | maxZoom = 3f |
float | rotationFactor = 1f |
bool | showIcon = false |
int | iconID = -1 |
AudioClip | moveSoundClip |
AudioClip | collideSoundClip |
float | slideSoundThreshold = 0.03f |
float | slidePitchFactor = 1f |
bool | onlyPlayLowerCollisionSound = false |
bool | ignoreMoveableRigidbodies |
bool | ignorePlayerCollider |
bool | childrenShareLayer |
OffScreenRelease | offScreenRelease = OffScreenRelease.GrabPoint |
Sound | moveSound |
Public Attributes inherited from AC.Moveable | |
bool | predictCollisions |
Protected Member Functions | |
override void | Awake () |
override void | OnEnable () |
virtual void | Start () |
override void | OnDisable () |
void | OnCollisionExit (Collision collision) |
void | OnSwitchCamera (_Camera oldCamera, _Camera newCamera, float transitionTime) |
void | LimitToActiveCamera (_Camera _camera) |
void | PlaceOnLayer (int layerName) |
void | BaseOnCollisionEnter (Collision collision) |
void | PlayMoveSound (float speed) |
void | UpdateZoom () |
void | LimitZoom () |
CursorIconBase | GetMainIcon () |
void | LimitCollisions () |
Protected Member Functions inherited from AC.Moveable | |
void | Update () |
void | Kill () |
Protected Attributes | |
bool | isHeld = false |
Transform | grabPoint |
float | distanceToCamera |
float | speedFactor = 0.16f |
float | originalDrag |
float | originalAngularDrag |
int | numCollisions = 0 |
CursorIconBase | icon |
Sound | collideSound |
bool | isOn = true |
Protected Attributes inherited from AC.Moveable | |
float | positionChangeTime |
float | positionStartTime |
AnimationCurve | positionTimeCurve |
MoveMethod | positionMethod |
Vector3 | startPosition |
Vector3 | endPosition |
bool | inWorldSpace |
float | rotateChangeTime |
float | rotateStartTime |
AnimationCurve | rotateTimeCurve |
MoveMethod | rotateMethod |
bool | doEulerRotation = false |
Vector3 | startEulerRotation |
Vector3 | endEulerRotation |
Quaternion | startRotation |
Quaternion | endRotation |
float | scaleChangeTime |
float | scaleStartTime |
AnimationCurve | scaleTimeCurve |
MoveMethod | scaleMethod |
Vector3 | startScale |
Vector3 | endScale |
Char | character |
Rigidbody | _rigidbody |
Rigidbody2D | _rigidbody2D |
Properties | |
bool | IsHeld [get] |
Properties inherited from AC.Moveable | |
Rigidbody | Rigidbody [get] |
Transform | Transform [get] |
The base class of objects that can be picked up and moved around with the mouse / touch.
|
virtual |
Applies a drag force on the object, based on the movement of the cursor.
force | The force vector to apply |
mousePosition | The position of the mouse |
distanceToCamera | The distance between the object's centre and the camera |
Reimplemented in AC.Moveable_Drag, and AC.Moveable_PickUp.
bool AC.DragBase.CanGrab | ( | ) |
Checks if the object can currently be grabbed
|
virtual |
If True, 'ToggleCursor' can be used while the object is held.
Reimplemented in AC.Moveable_PickUp.
|
virtual |
Draws an icon at the point of contact on the object, if appropriate.
Reimplemented in AC.Moveable_Drag.
Vector3 AC.DragBase.GetGrabPosition | ( | ) |
Gets the point of contact on the object, once grabbed.
|
virtual |
Attaches the object to the player's control.
grabPosition | The point of contact on the object |
Reimplemented in AC.Moveable_Drag, and AC.Moveable_PickUp.
bool AC.DragBase.IsCloseToCamera | ( | float | maxDistance | ) |
Checks if the point of contact is close enough to the camera to continue being held.
maxDistance | The maximum-allowed distance between the point of contact and the camera |
bool AC.DragBase.IsOnScreen | ( | ) |
Checks if the the point of contact is visible on-screen.
|
virtual |
Detaches the object from the player's control.
Reimplemented in AC.Moveable_Drag, and AC.Moveable_PickUp.
bool AC.DragBase.PlayerIsWithinBoundary | ( | ) |
void AC.DragBase.TurnOff | ( | ) |
Makes the object non-interactive.
void AC.DragBase.TurnOff | ( | bool | manualSet | ) |
void AC.DragBase.TurnOn | ( | ) |
Makes the object interactive.
void AC.DragBase.TurnOn | ( | bool | manualSet | ) |
Makes the object interactive.
manualSet | If True, then the object will be considered 'On" when saving |
|
virtual |
Called every frame by StateHandler.
Reimplemented in AC.Moveable_Drag, and AC.Moveable_PickUp.
bool AC.DragBase.allowZooming = false |
If True, the object can be moved towards and away from the camera
bool AC.DragBase.childrenShareLayer |
If True, then this object's children will be placed on the same layer
AudioClip AC.DragBase.collideSoundClip |
The sound to play when the object has a collision
int AC.DragBase.iconID = -1 |
The ID number of the CursorIcon that gets shown if showIcon = true, as defined in CursorManager's cursorIcons List
bool AC.DragBase.ignoreMoveableRigidbodies |
If True, then the Physics system will ignore collisions between this object and the boundary colliders of any DragTrack that this is not locked to
bool AC.DragBase.ignorePlayerCollider |
If True, then the Physics system will ignore collisions between this object and the player
InteractiveBoundary AC.DragBase.interactiveBoundary |
If assigned, then the draggable will only be interactive when the player is within this Trigger Collider's boundary
bool AC.DragBase.invertInput = false |
If True, input vectors will be inverted
_Camera AC.DragBase.limitToCamera = null |
If assigned, then the draggable will only be interactive when the assigned _Camera is active
float AC.DragBase.maxSpeed = 200f |
The maximum force magnitude that can be applied to itself
float AC.DragBase.maxZoom = 3f |
The maxiumum distance that there can be between the object and the camera (if allowZooming = True)
float AC.DragBase.minZoom = 1f |
The minimum distance that there can be between the object and the camera (if allowZooming = True)
AudioClip AC.DragBase.moveSoundClip |
The sound to play when the object is moved
OffScreenRelease AC.DragBase.offScreenRelease = OffScreenRelease.GrabPoint |
What should cause the object to be automatically released if it leaves the screen
bool AC.DragBase.onlyPlayLowerCollisionSound = false |
If True, then the collision sound will only play when the object collides with its lower boundary collider
float AC.DragBase.playerMovementInfluence = 1f |
The influence that player movement has on the drag force
float AC.DragBase.playerMovementReductionFactor = 0f |
How much player movement is reduced by when the object is being dragged
float AC.DragBase.rotationFactor = 1f |
The speed by which the object can be rotated
bool AC.DragBase.showIcon = false |
If True, then an icon will be displayed at the "grab point" when the object is held
float AC.DragBase.slidePitchFactor = 1f |
The factor by which the movement sound's pitch is adjusted in relation to speed
float AC.DragBase.slideSoundThreshold = 0.03f |
The minimum speed that the object must be moving by for sound to play
float AC.DragBase.zoomSpeed = 60f |
The speed at which the object can be moved towards and away from the camera (if allowZooming = True)
|
get |
If True, the object is currently held by the player