Click or drag to resize

TapGesture Class

Recognizes a tap.
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          TouchScript.CoreDebuggableMonoBehaviour
            TouchScript.GesturesGesture
              TouchScript.GesturesTapGesture

Namespace:  TouchScript.Gestures
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public class TapGesture : Gesture

The TapGesture type exposes the following members.

Constructors
  NameDescription
Public methodTapGesture
Initializes a new instance of the TapGesture class
Top
Properties
  NameDescription
Public propertyActivePointers
Gets list of gesture's active pointers.
(Inherited from Gesture.)
Public propertyCombinePointers
Gets or sets the flag if pointers should be treated as a cluster.
Public propertyCombinePointersInterval
Gets or sets time interval before gesture is recognized to combine all lifted pointers into a cluster to use its center as [!:ScreenPosition].
Public propertyDebugMode
Gets or sets if this object should show its debug information.
(Inherited from DebuggableMonoBehaviour.)
Public propertyDelegate
Gets or sets an object implementing IGestureDelegate to be asked for gesture specific actions.
(Inherited from Gesture.)
Public propertyDistanceLimit
Gets or sets maximum distance for point cluster must move for the gesture to fail.
Protected propertygestureManager
Reference to global GestureManager.
(Inherited from Gesture.)
Public propertyMaxPointers
Gets or sets maximum number of pointers this gesture reacts to. The gesture will not be recognized if it has more than MaxPointers pointers.
(Inherited from Gesture.)
Public propertyMinPointers
Gets or sets minimum number of pointers this gesture reacts to. The gesture will not be recognized if it has less than MinPointers pointers.
(Inherited from Gesture.)
Public propertyNormalizedScreenPosition
Gets normalized screen position.
(Inherited from Gesture.)
Public propertyNumberOfTapsRequired
Gets or sets the number of taps required for the gesture to recognize.
Public propertyNumPointers
Gets the number of active pointerss.
(Inherited from Gesture.)
Protected propertypointersNumState
The state of min/max number of pointers.
(Inherited from Gesture.)
Public propertyPreviousNormalizedScreenPosition
Gets previous screen position.
(Inherited from Gesture.)
Public propertyPreviousScreenPosition
Gets previous screen position.
(Inherited from Gesture.)
Public propertyPreviousState
Gets previous gesture state.
(Inherited from Gesture.)
Public propertyRequireGestureToFail
Gets or sets another gesture which must fail before this gesture can be recognized.
(Inherited from Gesture.)
Public propertyScreenPosition
Gets current screen position.
(Inherited from Gesture.)
Public propertySendMessageTarget
Gets or sets the target of Unity messages sent from this gesture.
(Inherited from Gesture.)
Public propertySendStateChangeEvents
Gets or sets a value indicating whether state change events are broadcasted if UseUnityEvents is true.
(Inherited from Gesture.)
Public propertySendStateChangeMessages
Gets or sets a value indicating whether state change events are broadcasted if UseSendMessage is true.
(Inherited from Gesture.)
Public propertyState
Gets current gesture state.
(Inherited from Gesture.)
Public propertyTimeLimit
Gets or sets maximum hold time before gesture fails.
Protected propertytouchManager
Reference to global TouchManager.
(Inherited from Gesture.)
Public propertyUseSendMessage
Gets or sets whether gesture should use Unity's SendMessage in addition to C# events.
(Inherited from Gesture.)
Public propertyUseUnityEvents
Gets or sets whether gesture should use Unity Events in addition to C# events.
(Inherited from Gesture.)
Top
Methods
  NameDescription
Public methodAddFriendlyGesture
Adds a friendly gesture.
(Inherited from Gesture.)
Protected methodAwake (Inherited from Gesture.)
Public methodCanBePreventedByGesture
Determines whether this instance can be prevented by specified gesture.
(Inherited from Gesture.)
Public methodCancel
Cancels this gesture.
(Inherited from Gesture.)
Public methodCancel(Boolean, Boolean)
Cancels this gesture.
(Inherited from Gesture.)
Public methodCanPreventGesture
Determines whether this instance can prevent the specified gesture.
(Inherited from Gesture.)
Public methodGetScreenPositionHitData
Returns HitData for gesture's ScreenPosition, i.e. what is right beneath it.
(Inherited from Gesture.)
Public methodHasPointer
Determines whether gesture controls a pointer.
(Inherited from Gesture.)
Public methodIsFriendly
Checks if a gesture is friendly with this gesture.
(Inherited from Gesture.)
Protected methodonBegan
Called when state is changed to Began.
(Inherited from Gesture.)
Protected methodonCancelled
Called when state is changed to Cancelled.
(Inherited from Gesture.)
Protected methodonChanged
Called when state is changed to Changed.
(Inherited from Gesture.)
Protected methodOnDestroy
Unity OnDestroy handler.
(Inherited from Gesture.)
Protected methodOnDisable
Unity OnDisable handler.
(Inherited from Gesture.)
Protected methodOnEnable
Unity Start handler.
(Overrides GestureOnEnable.)
Protected methodonFailed
Called when state is changed to Failed.
(Inherited from Gesture.)
Protected methodonIdle
Called when state is changed to Idle.
(Inherited from Gesture.)
Protected methodonPossible
Called when state is changed to Possible.
(Inherited from Gesture.)
Protected methodonRecognized
Called when state is changed to Recognized.
(Overrides GestureonRecognized.)
Protected methodpointersCancelled
Called when pointers are cancelled.
(Inherited from Gesture.)
Protected methodpointersPressed
Called when new pointers appear.
(Overrides GesturepointersPressed(IListPointer).)
Protected methodpointersReleased
Called if pointers are removed.
(Overrides GesturepointersReleased(IListPointer).)
Protected methodpointersUpdated
Called for moved pointers.
(Overrides GesturepointersUpdated(IListPointer).)
Protected methodreset
Called to reset gesture state after it fails or recognizes.
(Overrides Gesturereset.)
Protected methodsetState
Tries to change gesture state.
(Inherited from Gesture.)
Public methodShouldBegin
Specifies if gesture can begin or recognize.
(Inherited from Gesture.)
Protected methodshouldCachePointerPosition
Should the gesture cache this pointers to use it later in calculation of ScreenPosition.
(Overrides GestureshouldCachePointerPosition(Pointer).)
Public methodShouldReceivePointer
Specifies if gesture can receive this specific pointer point.
(Overrides GestureShouldReceivePointer(Pointer).)
Top
Events
  NameDescription
Public eventCancelled
Occurs when gesture is cancelled.
(Inherited from Gesture.)
Public eventStateChanged
Occurs when gesture changes state.
(Inherited from Gesture.)
Public eventTapped
Occurs when gesture is recognized.
Top
Fields
  NameDescription
Protected fieldactivePointers
Pointers the gesture currently owns and works with.
(Inherited from Gesture.)
Protected fieldbasicEditor (Inherited from Gesture.)
Protected fieldcachedPreviousScreenPosition
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.
(Inherited from Gesture.)
Protected fieldcachedScreenPosition
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.
(Inherited from Gesture.)
Protected fieldcachedTransform
Cached transform of the parent object.
(Inherited from Gesture.)
Public fieldOnStateChange
Occurs when gesture changes state.
(Inherited from Gesture.)
Public fieldOnTap
Unity event, occurs when gesture is recognized.
Public fieldStatic memberTAP_MESSAGE
Message name when gesture is recognized
Top
See Also