Adventure Creator  1.66.8
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.Moveable Class Reference
Inheritance diagram for AC.Moveable:
AC.DragBase AC.Moveable_Drag AC.Moveable_PickUp

Public Member Functions

void StopMoving ()
 
bool IsMoving (TransformType transformType)
 
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...
 

Detailed Description

This script provides functions to move or transform the GameObject it is attached to. It is used by the "Object: Transform" Action to move objects without scripting.

Member Function Documentation

◆ EndMovement()

void AC.Moveable.EndMovement ( )

Halts the GameObject, and sets its Transform to its target values, if it is being moved by this script.

◆ LoadData()

void AC.Moveable.LoadData ( MoveableData  saveData)

Updates its own variables from a MoveableData class.

Parameters
saveDataThe MoveableData class to load from

◆ Move() [1/2]

void AC.Moveable.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.

Parameters
_newVectorThe target values of either the GameObject's position, rotation or scale
_moveMethodThe interpolation method by which the GameObject moves (Linear, Smooth, Curved, EaseIn, EaseOut, CustomCurve)
_inWorldSpaceIf True, the movement will use world-space co-ordinates
_transitionTimeThe time, in seconds, that the movement should take place over
_transformTypeThe way in which the GameObject should be transformed (Translate, Rotate, Scale)
_doEulerRotationIf True, then the GameObject's eulerAngles will be directly manipulated. Otherwise, the rotation as a Quaternion will be affected.
_timeCurveIf _moveMethod = MoveMethod.CustomCurve, then the movement speed will follow the shape of the supplied AnimationCurve. This curve can exceed "1" in the Y-scale, allowing for overshoot effects.
clearExistingIf True, then existing transforms will be stopped before new transforms will be made

◆ Move() [2/2]

void AC.Moveable.Move ( Marker  _marker,
MoveMethod  _moveMethod,
bool  _inWorldSpace,
float  _transitionTime,
AnimationCurve  _timeCurve 
)

Moves the GameObject by referencing a Marker component as its target Transform.

Parameters
_markerA Marker whose position, rotation and scale will be the target values of the GameObject
_moveMethodThe interpolation method by which the GameObject moves (Linear, Smooth, Curved, EaseIn, EaseOut, CustomCurve)
_inWorldSpaceIf True, the movement will use world-space co-ordinates
_transitionTimeThe time, in seconds, that the movement should take place over
_timeCurveIf _moveMethod = MoveMethod.CustomCurve, then the movement speed will follow the shape of the supplied AnimationCurve. This curve can exceed "1" in the Y-scale, allowing for overshoot effects.

◆ SaveData()

MoveableData AC.Moveable.SaveData ( MoveableData  saveData)

Updates a MoveableData class with its own variables that need saving.

Parameters
saveDataThe original MoveableData class
Returns
The updated MoveableData class

◆ StopMoving()

void AC.Moveable.StopMoving ( )

Halts the GameObject, if it is being moved by this script.