wangguan
2020-12-04 9f2d1de6643eefe5467cac9c9f540a79d50b1ba7
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
36
37
38
39
40
41
42
43
44
45
using UnityEngine;
 
namespace Core.Input
{
    /// <summary>
    /// Class to track information about an active pointer input
    /// </summary>
    public class PointerActionInfo : PointerInfo
    {
        /// <summary>
        /// Position where the input started
        /// </summary>
        public Vector2 startPosition;
 
        /// <summary>
        /// Flick velocity is a moving average of deltas
        /// </summary>
        public Vector2 flickVelocity;
 
        /// <summary>
        /// Total movement for this pointer, since being held down
        /// </summary>
        public float totalMovement;
 
        /// <summary>
        /// Time hold started
        /// </summary>
        public float startTime;
 
        /// <summary>
        /// Has this input been dragged?
        /// </summary>
        public bool isDrag;
 
        /// <summary>
        /// Is this input holding?
        /// </summary>
        public bool isHold;
 
        /// <summary>
        /// Was this input previously holding, then dragged?
        /// </summary>
        public bool wasHold;
    }
}