public void Update() { DragGestureRecognizer.Update(); PinchGestureRecognizer.Update(); TwoFingerDragGestureRecognizer.Update(); TapGestureRecognizer.Update(); TwistGestureRecognizer.Update(); }
private void DisconnectFromRecognizers() { if (ManipulationSystem.Instance == null) { Debug.LogError("Manipulation system not found in scene."); return; } DragGestureRecognizer dragGestureRecognizer = ManipulationSystem.Instance.DragGestureRecognizer; if (dragGestureRecognizer != null) { dragGestureRecognizer.onGestureStarted -= OnGestureStarted; } PinchGestureRecognizer pinchGestureRecognizer = ManipulationSystem.Instance.PinchGestureRecognizer; if (pinchGestureRecognizer != null) { pinchGestureRecognizer.onGestureStarted -= OnGestureStarted; } TapGestureRecognizer tapGestureRecognizer = ManipulationSystem.Instance.TapGestureRecognizer; if (tapGestureRecognizer != null) { tapGestureRecognizer.onGestureStarted -= OnGestureStarted; } TwistGestureRecognizer twistGestureRecognizer = ManipulationSystem.Instance.TwistGestureRecognizer; if (twistGestureRecognizer != null) { twistGestureRecognizer.onGestureStarted -= OnGestureStarted; } TwoFingerDragGestureRecognizer twoFingerDragGestureRecognizer = ManipulationSystem.Instance.TwoFingerDragGestureRecognizer; if (twoFingerDragGestureRecognizer != null) { twoFingerDragGestureRecognizer.onGestureStarted -= OnGestureStarted; } }
/// <summary> /// Constructs a DragGesture gesture. /// </summary> /// <param name="recognizer">The gesture recognizer.</param> /// <param name="touch">The touch that started this gesture.</param> public DragGesture(DragGestureRecognizer recognizer, Touch touch) : base(recognizer) { FingerId = touch.fingerId; StartPosition = touch.position; Position = StartPosition; }