コード例 #1
0
ファイル: DemoScriptOneFinger.cs プロジェクト: bllxk/Shebao
        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;
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: DemoScriptImage.cs プロジェクト: bllxk/Shebao
        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);
        }
コード例 #5
0
        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;
        }
コード例 #6
0
        private void Start()
        {
            PanGestureRecognizer pan = new PanGestureRecognizer();

            pan.Updated += Pan_Updated;
            FingersScript.AddGesture(pan);
        }