单击手势进入极简模式
This commit is contained in:
parent
67abc1ef63
commit
d91dc17ea7
@ -297,13 +297,15 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
//单指
|
||||
var touchRecognizer = new TKAnyTouchRecognizer(new TKRect(0, 0, Screen.width, Screen.height));
|
||||
DateTime startTimpStamp = DateTime.Now;
|
||||
Vector2 touchLocation = Vector2.down;
|
||||
touchRecognizer.onEnteredEvent += (r) =>
|
||||
{
|
||||
touchLocation = r.startTouchLocation();
|
||||
startTimpStamp = DateTime.Now;
|
||||
};
|
||||
touchRecognizer.onExitedEvent += (r) =>
|
||||
{
|
||||
if (competitionId == 0 && isStart && IsPointerOverGameObject(r.startTouchLocation()))
|
||||
if (competitionId == 0 && isStart && IsPointerOverGameObject(touchLocation))
|
||||
{
|
||||
var timespan = DateTime.Now - startTimpStamp;
|
||||
UnityEngine.Debug.Log($"{timespan.TotalMilliseconds}");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user