Esempio n. 1
0
    void CreateLongPressGesture()
    {
        LongPressGestureRecognizer tap = new LongPressGestureRecognizer();

        tap.MinimumDurationSeconds = 0f;
        tap.StateUpdated          += Tap_Updated;
        FingersScript.Instance.AddGesture(tap);
        tap.AllowSimultaneousExecutionWithAllGestures();
        swipe.AllowSimultaneousExecutionWithAllGestures();
    }
Esempio n. 2
0
    void Start()
    {
        swipe = new SwipeGestureRecognizer();
        swipe.StateUpdated                 += Swipe_Updated;
        swipe.DirectionThreshold            = 0;
        swipe.MinimumSpeedUnits             = 1f;
        swipe.MinimumDistanceUnits          = 1f;
        swipe.MinimumNumberOfTouchesToTrack = swipe.MaximumNumberOfTouchesToTrack = SwipeTouchCount;
        swipe.ThresholdSeconds              = SwipeThresholdSeconds;
        FingersScript.Instance.AddGesture(swipe);
        LongPressGestureRecognizer tap = new LongPressGestureRecognizer();

        tap.MinimumDurationSeconds = 0f;
        tap.StateUpdated          += Tap_Updated;
        FingersScript.Instance.AddGesture(tap);
        tap.AllowSimultaneousExecutionWithAllGestures();
        swipe.AllowSimultaneousExecutionWithAllGestures();

        _cam = Camera.main;
    }