private void StartTouch(TouchState touch) { var index = IndexOfTouch(touch); if (index >= 0) { MoveTouch(touch); return; } _activeTouches.Add(touch); if (_activeTouches.Count == 1) { ProbablyClick?.Invoke(this, new SimpleInteractionEventArgs(_environment.Raycast(touch.ScreenPosition))); _potentialClick = true; } else if (_activeTouches.Count == 2) { if (_potentialClick) { ClickCanceled?.Invoke(this, new SimpleInteractionEventArgs(_environment.Raycast(_activeTouches[0].ScreenPosition))); _potentialClick = false; } UpdateMultitouch(); } }
private void HandleJoystickButtonDown(JoystickButtonDownEventArgs args) { switch (args.Button) { case 0: ProbablyClick?.Invoke(this, GetSimleEventArg()); break; } }