Gesture Class |
Namespace: TouchScript.Gestures
public abstract class Gesture : DebuggableMonoBehaviour
The Gesture type exposes the following members.
Name | Description | |
---|---|---|
ActivePointers |
Gets list of gesture's active pointers.
| |
DebugMode |
Gets or sets if this object should show its debug information.
(Inherited from DebuggableMonoBehaviour.) | |
Delegate |
Gets or sets an object implementing IGestureDelegate to be asked for gesture specific actions.
| |
gestureManager |
Reference to global GestureManager.
| |
MaxPointers |
Gets or sets maximum number of pointers this gesture reacts to.
The gesture will not be recognized if it has more than MaxPointers pointers.
| |
MinPointers |
Gets or sets minimum number of pointers this gesture reacts to.
The gesture will not be recognized if it has less than MinPointers pointers.
| |
NormalizedScreenPosition |
Gets normalized screen position.
| |
NumPointers |
Gets the number of active pointerss.
| |
pointersNumState |
The state of min/max number of pointers.
| |
PreviousNormalizedScreenPosition |
Gets previous screen position.
| |
PreviousScreenPosition |
Gets previous screen position.
| |
PreviousState |
Gets previous gesture state.
| |
RequireGestureToFail |
Gets or sets another gesture which must fail before this gesture can be recognized.
| |
ScreenPosition |
Gets current screen position.
| |
SendMessageTarget |
Gets or sets the target of Unity messages sent from this gesture.
| |
SendStateChangeEvents |
Gets or sets a value indicating whether state change events are broadcasted if UseUnityEvents is true.
| |
SendStateChangeMessages |
Gets or sets a value indicating whether state change events are broadcasted if UseSendMessage is true.
| |
State |
Gets current gesture state.
| |
touchManager |
Reference to global TouchManager.
| |
UseSendMessage |
Gets or sets whether gesture should use Unity's SendMessage in addition to C# events.
| |
UseUnityEvents |
Gets or sets whether gesture should use Unity Events in addition to C# events.
|
Name | Description | |
---|---|---|
AddFriendlyGesture |
Adds a friendly gesture.
| |
Awake | ||
CanBePreventedByGesture |
Determines whether this instance can be prevented by specified gesture.
| |
Cancel |
Cancels this gesture.
| |
Cancel(Boolean, Boolean) |
Cancels this gesture.
| |
CanPreventGesture |
Determines whether this instance can prevent the specified gesture.
| |
GetScreenPositionHitData |
Returns HitData for gesture's ScreenPosition, i.e. what is right beneath it.
| |
HasPointer |
Determines whether gesture controls a pointer.
| |
IsFriendly |
Checks if a gesture is friendly with this gesture.
| |
onBegan |
Called when state is changed to Began.
| |
onCancelled |
Called when state is changed to Cancelled.
| |
onChanged |
Called when state is changed to Changed.
| |
OnDestroy |
Unity OnDestroy handler.
| |
OnDisable |
Unity OnDisable handler.
| |
OnEnable |
Unity Start handler.
| |
onFailed |
Called when state is changed to Failed.
| |
onIdle |
Called when state is changed to Idle.
| |
onPossible |
Called when state is changed to Possible.
| |
onRecognized |
Called when state is changed to Recognized.
| |
pointersCancelled |
Called when pointers are cancelled.
| |
pointersPressed |
Called when new pointers appear.
| |
pointersReleased |
Called if pointers are removed.
| |
pointersUpdated |
Called for moved pointers.
| |
reset |
Called to reset gesture state after it fails or recognizes.
| |
setState |
Tries to change gesture state.
| |
ShouldBegin |
Specifies if gesture can begin or recognize.
| |
shouldCachePointerPosition |
Should the gesture cache this pointers to use it later in calculation of ScreenPosition.
| |
ShouldReceivePointer |
Specifies if gesture can receive this specific pointer point.
|
Name | Description | |
---|---|---|
Cancelled |
Occurs when gesture is cancelled.
| |
StateChanged |
Occurs when gesture changes state.
|
Name | Description | |
---|---|---|
activePointers |
Pointers the gesture currently owns and works with.
| |
basicEditor | ||
cachedPreviousScreenPosition |
Cached previous screen position.
Used to keep tap's position which can't be calculated from pointers when the gesture is recognized since all pointers are gone.
| |
cachedScreenPosition |
Cached screen position.
Used to keep tap's position which can't be calculated from pointers when the gesture is recognized since all pointers are gone.
| |
cachedTransform |
Cached transform of the parent object.
| |
CANCEL_MESSAGE |
Message sent when gesture is cancelled if SendMessage is used.
| |
OnStateChange |
Occurs when gesture changes state.
| |
STATE_CHANGE_MESSAGE |
Message sent when gesture changes state if SendMessage is used.
|