Example #1
0
    void OnFingerHover(FingerHoverEvent e)
    {
        GameObject selection = e.Selection;

        if (selection == null)
        {
            return;
        }

        SenseGuesture sense = selection.GetComponent <SenseGuesture>();

        if (sense != null)
        {
            sense.DealOnFingerHover(e);
        }
    }
Example #2
0
    void OnTap(TapGesture gesture)
    {
        GameObject selection = gesture.StartSelection;

        if (selection == null)
        {
            return;
        }

        Debug.Log("on Tap select " + selection.name);
        SenseGuesture sense = selection.GetComponent <SenseGuesture>();

        if (sense != null)
        {
            sense.DealTap(gesture);
        }
    }
Example #3
0
    //blow the patels when swipe
    void OnSwipe(SwipeGesture gesture)
    {
        // if (swipeTime <= 0 )
        //    return;
        // swipeTime = swipeTime - 1;

        // make sure we started the swipe gesture on our swipe object
        GameObject selection = gesture.StartSelection;          // we use the object the swipe started on, instead of the current one

        if (selection == null)
        {
            return;
        }
        SenseGuesture sense = selection.GetComponent <SenseGuesture>();

        if (sense != null)
        {
            sense.DealSwipe(gesture);
        }
    }