![]() |
Adventure Creator
1.76.2
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
TrackSnapData (float _positionAlong, int[] idArray) | |
TrackSnapData | ShowGUI (DragTrack dragTrack, bool useAngles) |
void | DrawConnectionHandles (DragTrack track) |
Vector3 | GetWorldPosition (DragTrack track) |
Gets the position in world space of the centre of the snap region More... | |
float | GetDistanceFrom (float trackValue) |
Gets the distance, in Unity units, between a region along the track and the centre of a snapping point More... | |
void | EvaluateConnectionPoints (DragTrack track, Moveable_Drag draggable, Vector3 dragForce) |
void | MoveTo (Moveable_Drag draggable, float speed) |
Moves a draggable object towards the snap point More... | |
bool | IsWithinRegion (float trackValue) |
Checks if a region along the track is within the snap's region More... | |
void | RunSnapCutscene (ActionListSource actionListSource) |
Runs the 'on snap' ActionList associated with the region More... | |
Protected Attributes | |
bool | isDisabled = false |
float | positionAlong |
float | width |
int | id |
List< TrackSnapConnection > | connections = new List<TrackSnapConnection>() |
Cutscene | cutsceneOnSnap = null |
AudioClip | soundOnEnter = null |
ActionListAsset | actionListAssetOnSnap = null |
string | label |
Color | gizmoColor |
Properties | |
float | PositionAlong [get] |
float | Width [get] |
int | ID [get] |
bool | IsEnabled [get, set] |
AudioClip | SoundOnEnter [get] |
string | EditorLabel [get] |
Color | GizmoColor [get] |
Stores information related to snapping draggable objects along tracks.
AC.TrackSnapData.TrackSnapData | ( | float | _positionAlong, |
int[] | idArray | ||
) |
The default constructor
float AC.TrackSnapData.GetDistanceFrom | ( | float | trackValue | ) |
Gets the distance, in Unity units, between a region along the track and the centre of a snapping point
trackValue | The distance along the track, as a decimal of its total length |
Vector3 AC.TrackSnapData.GetWorldPosition | ( | DragTrack | track | ) |
Gets the position in world space of the centre of the snap region
track | The track that the snap region is a part of. |
bool AC.TrackSnapData.IsWithinRegion | ( | float | trackValue | ) |
Checks if a region along the track is within the snap's region
trackValue | The distance along the track, as a decimal of its total length |
void AC.TrackSnapData.MoveTo | ( | Moveable_Drag | draggable, |
float | speed | ||
) |
Moves a draggable object towards the snap point
draggable | The object to move |
speed | How fast to move the object by |
void AC.TrackSnapData.RunSnapCutscene | ( | ActionListSource | actionListSource | ) |
Runs the 'on snap' ActionList associated with the region
actionListSource | The source of the ActionList (InScene, AssetFile) |
|
get |
A unique identifier
|
getset |
If True, the region is enabled
|
get |
How far along the track the snap point is
|
get |
The sound to play when a draggable enters this region
|
get |
How wide, as a proportion of the track length, the snap point is valid for