Ejemplo n.º 1
0
 void SetupGesture()
 {
     rotateGesture          = new RotateGestureRecognizer();
     rotateGesture.Updated += RotateGestureCallBack;
     //rotateGesture.Updated += RotateGestureCallBack;
     FingersScript.Instance.AddGesture(rotateGesture);
 }
Ejemplo n.º 2
0
    private void Start()
    {
        control     = OnlineMapsControlBase.instance;
        cameraOrbit = OnlineMapsCameraOrbit.instance;

        scaleGesture = new ScaleGestureRecognizer();
        scaleGesture.StateUpdated += ScaleGestureCallback;
        FingersScript.Instance.AddGesture(scaleGesture);

        if (cameraOrbit != null)
        {
            rotateGesture = new RotateGestureRecognizer();
            rotateGesture.StateUpdated += RotateGestureCallback;
            FingersScript.Instance.AddGesture(rotateGesture);
        }
    }
Ejemplo n.º 3
0
    private void SetupGesture()
    {
        panner = new PanGestureRecognizer();
        panner.StateUpdated += PanGestureCallback;
        FingersScript.Instance.AddGesture(panner);

        tapper = new TapGestureRecognizer();
        tapper.StateUpdated += ScreenTapped;
        FingersScript.Instance.AddGesture(tapper);

        zoomer = new ScaleGestureRecognizer();
        zoomer.StateUpdated += Zoom;
        FingersScript.Instance.AddGesture(zoomer);

        rotator = new RotateGestureRecognizer();
        rotator.StateUpdated += Rotate;
        FingersScript.Instance.AddGesture(rotator);
    }
Ejemplo n.º 4
0
        public void Start()
        {
            tapGesture       = new TapGestureRecognizer();
            doubleTapGesture = new TapGestureRecognizer();
            swipeGesture     = new SwipeGestureRecognizer();
            panGesture       = new PanGestureRecognizer();
            scaleGesture     = new ScaleGestureRecognizer();
            rotateGesture    = new RotateGestureRecognizer();
            longPressGesture = new LongPressGestureRecognizer();
            tripleTapGesture = new TapGestureRecognizer();

            //CreateDoubleTapGesture();
            //CreateTapGesture();
            CreateSwipeGesture();

            //CreatePanGesture();
            //CreateScaleGesture();
            //CreateRotateGesture();
            //CreateLongPressGesture();
            //CreatePlatformSpecificViewTripleTapGesture();
        }
    void Awake()
    {
        panGestureRecognizer = new PanGestureRecognizer
        {
            MinimumNumberOfTouchesToTrack = 1,
            MaximumNumberOfTouchesToTrack = 1
        };

        panGestureRecognizer.AllowSimultaneousExecutionWithAllGestures();
        panGestureRecognizer.StateUpdated += PanStateUpdated;
        FingersScript.Instance.AddGesture(panGestureRecognizer);

        rotateGestureRecognizer = new RotateGestureRecognizer
        {
            MinimumNumberOfTouchesToTrack = 2,
            MaximumNumberOfTouchesToTrack = 2
        };

        rotateGestureRecognizer.AllowSimultaneousExecutionWithAllGestures();
        rotateGestureRecognizer.StateUpdated += RotateStateUpdated;
        FingersScript.Instance.AddGesture(rotateGestureRecognizer);

        rotateGestureRecognizer.DisallowSimultaneousExecution(panGestureRecognizer);
    }
Ejemplo n.º 6
0
 private void CreateRotateGesture()
 {
     rotateGesture = new RotateGestureRecognizer();
     rotateGesture.StateUpdated += RotateCam;
     FingersScript.Instance.AddGesture(rotateGesture);
 }
Ejemplo n.º 7
0
 private void CreateRotateGesture()
 {
     rotateGesture = new RotateGestureRecognizer();
     rotateGesture.StateUpdated += RotateGestureCallback;
     fingerScript.AddGesture(rotateGesture);
 }