![]() |
Adventure Creator
1.76.2
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
override void | UpdateMovement () |
override void | Grab (Vector3 grabPosition) |
Attaches the object to the player's control. More... | |
override void | LetGo (bool ignoreInteractions=false) |
override bool | CanToggleCursor () |
override void | ApplyDragForce (Vector3 force, Vector3 _screenMousePosition, float _distanceToCamera) |
Applies a drag force on the object, based on the movement of the cursor. More... | |
void | UnsetFixedJoint () |
void | OverrideMoveToPosition (Vector3 newPosition) |
Causes the object's target position to be overridden when held More... | |
void | ClearMoveOverride () |
Vector3 | GetWorldMousePosition () |
bool | ReferencesAsset (ActionListAsset actionListAsset) |
List< ActionListAsset > | GetReferencedActionListAssets () |
![]() | |
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 void | DrawGrabIcon () |
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... | |
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... | |
![]() | |
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 () |
Protected Member Functions | |
override void | Awake () |
override void | Start () |
new void | Update () |
void | LateUpdate () |
void | OnCollisionEnter (Collision collision) |
void | RunInteraction (bool onGrab) |
void | ChargeThrow () |
void | ReleaseThrow () |
void | SetRotationMode (bool on) |
void | UpdateFixedJoint () |
new void | UpdateZoom () |
float | GetAlignedDistance (Vector3 screenMousePosition) |
![]() | |
override void | OnEnable () |
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 () |
![]() | |
void | Update () |
void | Kill () |
Protected Attributes | |
bool | isChargingThrow = false |
float | throwCharge = 0f |
float | chargeStartTime |
bool | inRotationMode = false |
float | originalDistanceToCamera |
Vector3 | worldMousePosition |
Vector3 | deltaMovement |
LerpUtils.Vector3Lerp | fixedJointLerp = new LerpUtils.Vector3Lerp () |
![]() | |
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 |
![]() | |
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 |
Additional Inherited Members | |
![]() | |
bool | IsHeld [get] |
![]() | |
Rigidbody | Rigidbody [get] |
Transform | Transform [get] |
Attaching this component to a GameObject allows it to be picked up and manipulated freely by the player.
|
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 from AC.DragBase.
|
virtual |
If True, 'ToggleCursor' can be used while the object is held.
Reimplemented from AC.DragBase.
void AC.Moveable_PickUp.ClearMoveOverride | ( | ) |
Clears any override set by the OverrideMoveToPosition function
Vector3 AC.Moveable_PickUp.GetWorldMousePosition | ( | ) |
Returns the position of the cursor that's dragging the PickUp in world-space
|
virtual |
Attaches the object to the player's control.
grabPosition | The point of contact on the object |
Reimplemented from AC.DragBase.
|
virtual |
Detaches the object from the player's control.
Reimplemented from AC.DragBase.
void AC.Moveable_PickUp.OverrideMoveToPosition | ( | Vector3 | newPosition | ) |
Causes the object's target position to be overridden when held
newPosition | The new position |
void AC.Moveable_PickUp.UnsetFixedJoint | ( | ) |
Unsets the FixedJoint used to hold the object in place
|
virtual |
Called every frame by StateHandler.
Reimplemented from AC.DragBase.
ActionListAsset AC.Moveable_PickUp.actionListAssetOnDrop = null |
The ActionListAsset to run whenever the object is let go by the player (and actionListSource = ActionListSource.AssetFile)
ActionListAsset AC.Moveable_PickUp.actionListAssetOnGrab = null |
The ActionListAsset to run whenever the object is grabbed by the player (and actionListSource = ActionListSource.AssetFile)
ActionListSource AC.Moveable_PickUp.actionListSource = ActionListSource.InScene |
Where to locate interactions
bool AC.Moveable_PickUp.allowRotation = false |
If True, the object can be rotated
bool AC.Moveable_PickUp.allowThrow = false |
If True, the object can be thrown
bool AC.Moveable_PickUp.autoSetConstraints = true |
If True, then Rigidbody constraints will be set automatically based on the interaction state
float AC.Moveable_PickUp.breakForce = 300f |
The maximum force magnitude that can be applied by the player - if exceeded, control will be removed
float AC.Moveable_PickUp.chargeTime = 0.5f |
How long a "charge" takes, if the object cen be thrown
int AC.Moveable_PickUp.dropParameterID = -1 |
The parameter ID to set as this object in the interactionOnDrop / actionListAssetOnDrop ActionLists
float AC.Moveable_PickUp.initialLift = 0.05f |
The lift to give objects picked up, so that they aren't touching the ground when initially held
Interaction AC.Moveable_PickUp.interactionOnDrop = null |
The Interaction to run whenever the object is let go by the player (and actionListSource = ActionListSource.InScene)
Interaction AC.Moveable_PickUp.interactionOnGrab |
The Interaction to run whenever the object is picked up by the player
float AC.Moveable_PickUp.maxAngularVelocity = 7f |
The maximum angular velocity of the Rigidbody, set if allowRotation = true
float AC.Moveable_PickUp.maxDistance = 1f |
The minimum distance to keep from the camera
float AC.Moveable_PickUp.minDistance = 0.2f |
The minimum distance to keep from the camera
int AC.Moveable_PickUp.moveParameterID = -1 |
The parameter ID to set as this object in the interactionOnGrab / actionListAssetOnGrab ActionLists
float AC.Moveable_PickUp.pullbackDistance = 0.6f |
How far the object is pulled back while chargine, if the object can be thrown
float AC.Moveable_PickUp.throwForce = 400f |
How far the object can be thrown