private void Start() { FingerScript.AddGesture(rotationGesture); rotationGesture.Updated += RotationGestureUpdated; FingerScript.AddGesture(scaleGesture); scaleGesture.Updated += ScaleGestureUpdated; // if you wanted to rotate the earth from the center of the earth rather than the button, you could do this: //Vector3 screenPos = Camera.main.WorldToScreenPoint(Earth.transform.position); //rotationGesture.AnglePointOverrideX = screenPos.x; //rotationGesture.AnglePointOverrideY = screenPos.y; }
private void Start() { PanGestureRecognizer pan = new PanGestureRecognizer(); pan.StateUpdated += Pan_Updated; FingersScript.AddGesture(pan); TapGestureRecognizer tap = new TapGestureRecognizer(); tap.StateUpdated += Tap_StateUpdated; tap.ClearTrackedTouchesOnEndOrFail = true; tap.AllowSimultaneousExecution(pan); FingersScript.AddGesture(tap); }
private void Start() { ScaleGestureRecognizer scale = new ScaleGestureRecognizer(); scale.StateUpdated += Scale_Updated; scale.PlatformSpecificView = ScrollView.gameObject; FingersScript.AddGesture(scale); TapGestureRecognizer tap = new TapGestureRecognizer(); tap.NumberOfTapsRequired = 2; tap.StateUpdated += Tap_Updated; tap.PlatformSpecificView = ScrollView.gameObject; FingersScript.AddGesture(tap); }
private void Start() { TapGestureRecognizer tap = new TapGestureRecognizer(); tap.Updated += Tap_Updated; FingersScript.AddGesture(tap); imageGesture.MaximumPathCount = 2; imageGesture.Updated += ImageGestureUpdated; imageGesture.MaximumPathCountExceeded += MaximumPathCountExceeded; imageGesture.GestureImages = new List <ImageGestureImage>(recognizableImages.Keys); FingersScript.AddGesture(imageGesture); // imageGesture.Simulate(752, 382, 760, 365, 768, 348, 780, 335, 789, 329, 802, 327, 814, 336, 828, 354, 837, 371, 841, 381, 841, 386); }
private void Start() { ScaleGestureRecognizer scale = new ScaleGestureRecognizer(); scale.Updated += Scale_Updated; FingersScript.AddGesture(scale); TapGestureRecognizer tap = new TapGestureRecognizer(); tap.NumberOfTapsRequired = 2; tap.Updated += Tap_Updated; FingersScript.AddGesture(tap); FingersScript.CaptureGestureHandler = CaptureGestureHandler; }
private void Start() { PanGestureRecognizer pan = new PanGestureRecognizer(); pan.Updated += Pan_Updated; FingersScript.AddGesture(pan); }