-
-
Notifications
You must be signed in to change notification settings - Fork 911
/
GestureEventTap.cs
35 lines (31 loc) · 1.13 KB
/
GestureEventTap.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright (c) Stride contributors (https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
using System;
using Stride.Core.Mathematics;
namespace Stride.Input
{
/// <summary>
/// Event class for the Tap gesture.
/// </summary>
public sealed class GestureEventTap : GestureEvent
{
/// <summary>
/// The number of time the use successively touched the screen.
/// </summary>
public int NumberOfTaps { get; internal set; }
/// <summary>
/// The position of the tap.
/// </summary>
public Vector2 TapPosition { get; internal set; }
internal void Set(TimeSpan takenTime, int numberOfFingers, int numberOfTaps, Vector2 position)
{
Type = GestureType.Tap;
State = GestureState.Occurred;
DeltaTime = takenTime;
TotalTime = takenTime;
NumberOfFinger = numberOfFingers;
NumberOfTaps = numberOfTaps;
TapPosition = position;
}
}
}