public override bool ProcessGesture(Gesture.Directions direction, float delta)
    {
        int page = Mathf.RoundToInt(delta / _gestureController._minimumAmplitude);

        if (page <= 0)
        {
            return(false);
        }

        if (direction == Gesture.Directions.Left || direction == Gesture.Directions.DownLeft ||
            direction == Gesture.Directions.UpLeft)
        {
            _coverFlow.FlowCover(page);

            return(true);
        }
        else if (direction == Gesture.Directions.Right || direction == Gesture.Directions.DownRight ||
                 direction == Gesture.Directions.UpRight)
        {
            _coverFlow.FlowCover(-page);

            return(true);
        }

        return(false);
    }
    public override bool ProcessGesture(Gesture.Directions direction, float delta)
    {
        if (direction == Gesture.Directions.Left || direction == Gesture.Directions.DownLeft || direction == Gesture.Directions.UpLeft)
        {
            this.GetComponent <CharacterSelector>().ShowPreviousSelection();
        }
        else if (direction == Gesture.Directions.Right || direction == Gesture.Directions.DownRight || direction == Gesture.Directions.UpRight)
        {
            this.GetComponent <CharacterSelector>().ShowNextSelection();
        }

        return(true);
    }
Exemple #3
0
    public override bool ProcessGesture(Gesture.Directions direction, float delta)
    {
        if (direction == Gesture.Directions.Left)
        {
            if (_hidePanel)
            {
                gameObject.SendMessage("OnClick", SendMessageOptions.DontRequireReceiver);
            }
        }
        else if (direction == Gesture.Directions.Right)
        {
            if (!_hidePanel)
            {
                gameObject.SendMessage("OnClick", SendMessageOptions.DontRequireReceiver);
            }
        }

        return(true);
    }
 public virtual bool ProcessGesture(Gesture.Directions dir, float delta)
 {
     return(true);
 }
Exemple #5
0
    //The method that will run when a gesture event occours
    private void handleGesture(object sender, Gesture.Directions e)
    {
        GameObject text = GameObject.Find("Debug");

        text.guiText.text = "direction: " + e;
    }