MeshBaker
Public Attributes | Protected Member Functions | Properties | Events | List of all members
TapGestureRecognizer Class Reference

Tap gesture: single or multiple consecutive press and release gestures at the same location More...

Inherits AveragedGestureRecognizer.

Public Attributes

int RequiredTaps = 0
 Exact number of taps required to succesfully recognize the tap gesture. More...
 
bool RaiseEventOnEachTap = false
 When set to true, the OnTap event will fire each time a tap occurs. More...
 
float MaxDelayBetweenTaps = 0.25f
 The maximum amount of the time that can elapse between two consecutive taps without causing the recognizer to reset. More...
 
float MaxDuration = 0.0f
 The maximum total duration of a tap sequence, in seconds. More...
 
float MoveTolerance = 5.0f
 How far the finger can move from its initial position without making the gesture fail More...
 
- Public Attributes inherited from AveragedGestureRecognizer
int RequiredFingerCount = 1
 Exact number of touches required for the gesture to be recognized More...
 
- Public Attributes inherited from GestureRecognizer
GestureResetMode ResetMode = GestureResetMode.StartOfTouchSequence
 Get or set the reset mode for this gesture recognizer More...
 

Protected Member Functions

override void Reset ()
 Put back the gesture recognizer in Ready state and reset any relevant data ResetMode More...
 
override void OnBegin (FingerGestures.IFingerList touches)
 Method called when the gesture recognizer has just started recognizing a valid gesture More...
 
override GestureState OnActive (FingerGestures.IFingerList touches)
 Method called on each frame that the gesture recognizer is in an active state More...
 
void RaiseOnTap ()
 
- Protected Member Functions inherited from AveragedGestureRecognizer
override int GetRequiredFingerCount ()
 Return the exact number of active touches required for the gesture to be valid More...
 
- Protected Member Functions inherited from GestureRecognizer
override void Start ()
 
virtual void OnTouchSequenceStarted ()
 Called when the first finger of a new multi-touch sequence has touched the screen More...
 
virtual void OnTouchSequenceEnded ()
 Called when all the fingers that participated in the current multi-touch sequence are no longer touching the screen More...
 
override void OnUpdate (FingerGestures.IFingerList touches)
 This is called after FingerGestures has updated the state of each finger More...
 
virtual GestureState OnReady (FingerGestures.IFingerList touches)
 
virtual bool ShouldFailFromReady (FingerGestures.IFingerList touches)
 
virtual bool CanBegin (FingerGestures.IFingerList touches)
 This controls whether or not the gesture recognition should begin More...
 
bool Young (FingerGestures.IFingerList touches)
 Check if all the touches in the list started recently More...
 
- Protected Member Functions inherited from FGComponent
virtual void Awake ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 

Properties

int Taps [get]
 Get the current number of consecutive taps achieved More...
 
- Properties inherited from AveragedGestureRecognizer
Vector2 StartPosition [get, protected set]
 Initial finger(s) position More...
 
Vector2 Position [get, protected set]
 Current finger(s) position More...
 
- Properties inherited from GestureRecognizer
GestureState PreviousState [get]
 Get the previous gesture state More...
 
GestureState State [get, protected set]
 Get or set the current gesture state More...
 
bool IsActive [get]
 Return true if the gesture recognition has started and is on-going State More...
 
FingerGestures.ITouchFilter TouchFilter [get, set]
 Get or set the touch filter used to modify the list of active touches about to be processed by the gesture recognizer More...
 

Events

EventDelegate< TapGestureRecognizerOnTap
 Event fired when a tap occurs (if RequiredTaps is 0) or when the exact number of RequiredTaps has been reached More...
 
- Events inherited from GestureRecognizer
EventDelegate< GestureRecognizerOnStateChanged
 Event fired whenever the gesture recognizer state changes State PreviousState More...
 

Additional Inherited Members

- Public Types inherited from GestureRecognizer
enum  GestureState { GestureState.Ready, GestureState.InProgress, GestureState.Failed, GestureState.Recognized }
 Possible gesture states More...
 
enum  GestureResetMode { GestureResetMode.NextFrame, GestureResetMode.EndOfTouchSequence, GestureResetMode.StartOfTouchSequence }
 The reset mode determines when to reset a GestureRecognizer after it fails or succeed (GestureState.Failed or GestureState.Recognized) More...
 
- Public Member Functions inherited from GestureRecognizer
virtual bool CheckCanBeginDelegate (FingerGestures.IFingerList touches)
 
delegate bool CanBeginDelegate (GestureRecognizer gr, FingerGestures.IFingerList touches)
 
void SetCanBeginDelegate (CanBeginDelegate f)
 
CanBeginDelegate GetCanBeginDelegate ()
 
- Public Member Functions inherited from FGComponent
delegate void EventDelegate< T > (T source)
 

Detailed Description

Tap gesture: single or multiple consecutive press and release gestures at the same location

Member Function Documentation

§ OnActive()

override GestureState TapGestureRecognizer.OnActive ( FingerGestures.IFingerList  touches)
protectedvirtual

Method called on each frame that the gesture recognizer is in an active state

Parameters
touchesThe active touches
Returns
The new state the gesture recognizer should be in

Implements GestureRecognizer.

§ OnBegin()

override void TapGestureRecognizer.OnBegin ( FingerGestures.IFingerList  touches)
protectedvirtual

Method called when the gesture recognizer has just started recognizing a valid gesture

Parameters
touchesThe active touches

Implements GestureRecognizer.

§ RaiseOnTap()

void TapGestureRecognizer.RaiseOnTap ( )
protected

§ Reset()

override void TapGestureRecognizer.Reset ( )
protectedvirtual

Put back the gesture recognizer in Ready state and reset any relevant data ResetMode

Reimplemented from GestureRecognizer.

Member Data Documentation

§ MaxDelayBetweenTaps

float TapGestureRecognizer.MaxDelayBetweenTaps = 0.25f

The maximum amount of the time that can elapse between two consecutive taps without causing the recognizer to reset.

Set to 0 to ignore this setting.

§ MaxDuration

float TapGestureRecognizer.MaxDuration = 0.0f

The maximum total duration of a tap sequence, in seconds.

The tap recognizer automatically resets after this duration. Set to 0 to ignore this setting.

§ MoveTolerance

float TapGestureRecognizer.MoveTolerance = 5.0f

How far the finger can move from its initial position without making the gesture fail

§ RaiseEventOnEachTap

bool TapGestureRecognizer.RaiseEventOnEachTap = false

When set to true, the OnTap event will fire each time a tap occurs.

When set to false, the OnTap event will only be fired on the last tap produced (either by time-out or when reaching the RequiredTaps count)

See also
RequiredTaps

§ RequiredTaps

int TapGestureRecognizer.RequiredTaps = 0

Exact number of taps required to succesfully recognize the tap gesture.

If RequiredTaps is set to a positive value, the gesture recognizer will reset once the number of consecutive taps performed is equal to this value.

See also
Taps

Property Documentation

§ Taps

int TapGestureRecognizer.Taps
get

Get the current number of consecutive taps achieved

Event Documentation

§ OnTap

EventDelegate<TapGestureRecognizer> TapGestureRecognizer.OnTap

Event fired when a tap occurs (if RequiredTaps is 0) or when the exact number of RequiredTaps has been reached


The documentation for this class was generated from the following file: