Click or drag to resize

Gesture Class

Base class for all gestures.
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          TouchScript.CoreDebuggableMonoBehaviour
            TouchScript.GesturesGesture
              More...

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

The Gesture type exposes the following members.

Constructors
  NameDescription
Protected methodGesture
Initializes a new instance of the Gesture class
Top
Properties
  NameDescription
Public propertyActivePointers
Gets list of gesture's active pointers.
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.
Protected propertygestureManager
Reference to global GestureManager.
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.
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.
Public propertyNormalizedScreenPosition
Gets normalized screen position.
Public propertyNumPointers
Gets the number of active pointerss.
Protected propertypointersNumState
The state of min/max number of pointers.
Public propertyPreviousNormalizedScreenPosition
Gets previous screen position.
Public propertyPreviousScreenPosition
Gets previous screen position.
Public propertyPreviousState
Gets previous gesture state.
Public propertyRequireGestureToFail
Gets or sets another gesture which must fail before this gesture can be recognized.
Public propertyScreenPosition
Gets current screen position.
Public propertySendMessageTarget
Gets or sets the target of Unity messages sent from this gesture.
Public propertySendStateChangeEvents
Gets or sets a value indicating whether state change events are broadcasted if UseUnityEvents is true.
Public propertySendStateChangeMessages
Gets or sets a value indicating whether state change events are broadcasted if UseSendMessage is true.
Public propertyState
Gets current gesture state.
Protected propertytouchManager
Reference to global TouchManager.
Public propertyUseSendMessage
Gets or sets whether gesture should use Unity's SendMessage in addition to C# events.
Public propertyUseUnityEvents
Gets or sets whether gesture should use Unity Events in addition to C# events.
Top
Methods
  NameDescription
Public methodAddFriendlyGesture
Adds a friendly gesture.
Protected methodAwake
Public methodCanBePreventedByGesture
Determines whether this instance can be prevented by specified gesture.
Public methodCancel
Cancels this gesture.
Public methodCancel(Boolean, Boolean)
Cancels this gesture.
Public methodCanPreventGesture
Determines whether this instance can prevent the specified gesture.
Public methodGetScreenPositionHitData
Returns HitData for gesture's ScreenPosition, i.e. what is right beneath it.
Public methodHasPointer
Determines whether gesture controls a pointer.
Public methodIsFriendly
Checks if a gesture is friendly with this gesture.
Protected methodonBegan
Called when state is changed to Began.
Protected methodonCancelled
Called when state is changed to Cancelled.
Protected methodonChanged
Called when state is changed to Changed.
Protected methodOnDestroy
Unity OnDestroy handler.
Protected methodOnDisable
Unity OnDisable handler.
Protected methodOnEnable
Unity Start handler.
Protected methodonFailed
Called when state is changed to Failed.
Protected methodonIdle
Called when state is changed to Idle.
Protected methodonPossible
Called when state is changed to Possible.
Protected methodonRecognized
Called when state is changed to Recognized.
Protected methodpointersCancelled
Called when pointers are cancelled.
Protected methodpointersPressed
Called when new pointers appear.
Protected methodpointersReleased
Called if pointers are removed.
Protected methodpointersUpdated
Called for moved pointers.
Protected methodreset
Called to reset gesture state after it fails or recognizes.
Protected methodsetState
Tries to change gesture state.
Public methodShouldBegin
Specifies if gesture can begin or recognize.
Protected methodshouldCachePointerPosition
Should the gesture cache this pointers to use it later in calculation of ScreenPosition.
Public methodShouldReceivePointer
Specifies if gesture can receive this specific pointer point.
Top
Events
  NameDescription
Public eventCancelled
Occurs when gesture is cancelled.
Public eventStateChanged
Occurs when gesture changes state.
Top
Fields
  NameDescription
Protected fieldactivePointers
Pointers the gesture currently owns and works with.
Protected fieldbasicEditor
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.
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.
Protected fieldcachedTransform
Cached transform of the parent object.
Public fieldStatic memberCANCEL_MESSAGE
Message sent when gesture is cancelled if SendMessage is used.
Public fieldOnStateChange
Occurs when gesture changes state.
Public fieldStatic memberSTATE_CHANGE_MESSAGE
Message sent when gesture changes state if SendMessage is used.
Top
See Also
Inheritance Hierarchy