Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
GestureEventTap.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 
5 using SiliconStudio.Core.Mathematics;
6 
7 namespace SiliconStudio.Paradox.Input
8 {
9  /// <summary>
10  /// Event class for the Tap gesture.
11  /// </summary>
12  public sealed class GestureEventTap : GestureEvent
13  {
14  /// <summary>
15  /// The number of time the use successively touched the screen.
16  /// </summary>
17  public int NumberOfTaps { get; internal set; }
18 
19  /// <summary>
20  /// The position (in pixels) of the tap.
21  /// </summary>
22  public Vector2 TapPosition { get; internal set; }
23 
24 
25  internal GestureEventTap(TimeSpan takenTime, int numberOfFingers, int numberOfTaps, Vector2 position)
26  {
27  Type = GestureType.Tap;
28  State = GestureState.Occurred;
29  DeltaTime = takenTime;
30  TotalTime = takenTime;
31  NumberOfFinger = numberOfFingers;
32  NumberOfTaps = numberOfTaps;
33  TapPosition = position;
34  }
35  }
36 }
Represents a two dimensional mathematical vector.
Definition: Vector2.cs:42
Event class for the Tap gesture.
Base class for the gesture events.
Definition: GestureEvent.cs:10