Beispiel #1
0
 void TouchUp(ref ArTouch touch)
 {
     // If this is the tracked touch, release that reference
     if (trackedTouchId == touch.id)
     {
         trackedTouchId = ArTouch.NULL_ID;
     }
     ArDebug.Log("Touch " + touch.id + " up at " + touch.position + "!");
 }
Beispiel #2
0
 void TouchMove(ref ArTouch touch)
 {
     // If this is the tracked touch, update using it
     if (trackedTouchId == touch.id)
     {
         drawPosition = touch.position;
     }
     ArDebug.Log("Touch " + touch.id + " moving at " + touch.position + "!");
 }
Beispiel #3
0
    // Draw some debug stuff

    /*void OnGUI()
     * {
     *      GUI.Label(new Rect(50,50, 100, 100),""+ ArTouchInput.GetInstance().GetNumTouches());
     *      if (trackedTouchId != ArTouch.NULL_ID)
     *      {
     *              // Magic numbers are bad, kids.  This is example code.
     *              // Also, the camera's screen space (and thus the touch's) has the origin in the bottom-left,
     *              // but the GUI has it in the top-left, so we've got to do a conversion on the y axis.
     *              GUI.Box(new Rect(drawPosition.x - 25, Screen.height - (drawPosition.y+25), 50, 50), "Butts!");
     *      }
     * }*/

    #region Touch Callbacks
    void TouchDown(ref ArTouch touch)
    {
        // We're not tracking any touches yet, so may as well track this one
        if (trackedTouchId == ArTouch.NULL_ID)
        {
            trackedTouchId = touch.id;
        }
        ArDebug.Log("Touch " + touch.id + " down at " + touch.position + "!");
    }
Beispiel #4
0
 void TouchDrag(ref ArTouch touch)
 {
     ArDebug.Log("Touch " + touch.id + " dragging at " + touch.position + "!");
 }
Beispiel #5
0
 void TouchPress(ref ArTouch touch)
 {
     ArDebug.Log("Touch " + touch.id + " pressing at " + touch.position + "!");
 }
Beispiel #6
0
 void TouchFlick(ref ArTouch touch)
 {
     ArDebug.Log("Touch " + touch.id + " flicked at " + touch.position + "!");
 }
Beispiel #7
0
 void TouchDoubleTap(ref ArTouch touch)
 {
     touch.isDead = true;
     ArDebug.Log("Touch " + touch.id + " double tapped at " + touch.position + "!");
 }
Beispiel #8
0
 void TouchTap(ref ArTouch touch)
 {
     ArDebug.Log("Touch " + touch.id + " tapped at " + touch.position + "!");
 }