![]() |
Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
|
Recognizes single-finger tap gestures by listening to touch events from an ITouchInput source. A tap is defined as a touch that begins and ends within a configurable maximum duration and without exceeding a configurable maximum movement distance. Long presses and drags are ignored. More...
Public Member Functions | |
| TapGestureRecognizer (ITouchInput touchInput) | |
| Initializes a new instance of the TapGestureRecognizer class, subscribing to touch events from the specified ITouchInput source. | |
| void | Dispose () |
| Releases all resources held by this recognizer and unsubscribes from the touch input source. After disposal, no further Tapped events will be raised. | |
Properties | |
| double | MaxTapDurationSeconds = 0.3 [get, set] |
Gets or sets the maximum duration in seconds that a touch may last to still be considered a tap. Contacts lasting longer than this threshold are treated as long presses and will not raise Tapped. Default is 0.3 seconds. | |
| double | MaxTapMovementPixels = 20 [get, set] |
Gets or sets the maximum distance in pixels that a touch may travel from its start position to still be considered a tap. Contacts that move more than this threshold are treated as drags and will not raise Tapped. Default is 20 pixels. | |
Events | |
| EventHandler< TappedEventArgs >? | Tapped |
| Occurs when a qualifying single-finger tap gesture is detected. | |
Recognizes single-finger tap gestures by listening to touch events from an ITouchInput source. A tap is defined as a touch that begins and ends within a configurable maximum duration and without exceeding a configurable maximum movement distance. Long presses and drags are ignored.
Subscribe to the Tapped event to receive notifications when a qualifying tap is detected.
A tap is recognized when:
Definition at line 24 of file TapGestureRecognizer.cs.
| Gondwana.Input.Touch.Gestures.TapGestureRecognizer.TapGestureRecognizer | ( | ITouchInput | touchInput | ) |
Initializes a new instance of the TapGestureRecognizer class, subscribing to touch events from the specified ITouchInput source.
| touchInput | The touch input source to monitor for tap gestures. Must not be null. |
| ArgumentNullException | Thrown when touchInput is null. |
Definition at line 66 of file TapGestureRecognizer.cs.
| void Gondwana.Input.Touch.Gestures.TapGestureRecognizer.Dispose | ( | ) |
Releases all resources held by this recognizer and unsubscribes from the touch input source. After disposal, no further Tapped events will be raised.
Definition at line 143 of file TapGestureRecognizer.cs.
|
getset |
Gets or sets the maximum duration in seconds that a touch may last to still be considered a tap. Contacts lasting longer than this threshold are treated as long presses and will not raise Tapped. Default is 0.3 seconds.
Definition at line 42 of file TapGestureRecognizer.cs.
|
getset |
Gets or sets the maximum distance in pixels that a touch may travel from its start position to still be considered a tap. Contacts that move more than this threshold are treated as drags and will not raise Tapped. Default is 20 pixels.
Definition at line 49 of file TapGestureRecognizer.cs.
| EventHandler<TappedEventArgs>? Gondwana.Input.Touch.Gestures.TapGestureRecognizer.Tapped |
Occurs when a qualifying single-finger tap gesture is detected.
Definition at line 54 of file TapGestureRecognizer.cs.