Esempio n. 1
0
 public void HandleSwipe(SwipEnum delta)
 {
     if (delta == SwipEnum.MOVE_FOWRAD || delta == SwipEnum.MOVE_BACK)
     {
         SetTextIfGazedAt("Swiped");
     }
 }
 //   /// <summary>
 //   /// Swipe
 //   /// </summary>
 //   /// <param name="detal"></param>
 public void Run_onSwipe(SwipEnum type)
 {
     //       foreach (var item in mFocusWidgetList)
     //       {
     //		item.RunOnSwip(type);
     //       }
 }
 /// <summary>
 /// trigger swip event
 /// </summary>
 /// <param name="go">Go.</param>
 /// <param name="type">Type.</param>
 public virtual void RunOnSwip(SwipEnum type)
 {
     if (onSwipe != null)
     {
         onSwipe(gameObject, type);
     }
 }
    /* Call when finger moves over 20% of touchpad. We have chosen to only allow swipes on the horizontal axis */

    public void HandleSwipe(SwipEnum delta)
    {
        if (delta == SwipEnum.MOVE_FOWRAD || delta == SwipEnum.MOVE_BACK)
        {
            SetColorIfGazedAt(Color.white);
        }
    }
    void OnSwipe(SwipEnum dir)
    {
        Vector3 pos = mCube.transform.position;

        switch (dir)
        {
        case SwipEnum.MOVE_BACK:
            pos.x -= 1;
            break;

        case SwipEnum.MOVE_DOWN:
            pos.y -= 1;
            break;

        case SwipEnum.MOVE_FOWRAD:
            pos.x += 1;
            break;

        case SwipEnum.MOVE_UP:
            pos.y += 1;
            break;
        }
        mCube.transform.position = pos;
    }
 void OnSwipe(SwipEnum dir)
 {
     swipString = "IVRTouchpad swip : " + dir;
     //Debug.Log(swipString);
 }