Beispiel #1
0
 public void TouchDown(MarshalledTouchEvent mTouch)
 {
     fingerId = mTouch.ID;
     phase = Win8TouchPhase.Began;
     position = new Vector2(mTouch.x, (Screen.height - mTouch.y + PIXEL_Y_CORRECTION));
     _previousPosition = position;
     touchTime = Time.time;
     _previousTouchTime = touchTime;
 }
Beispiel #2
0
    public void FrameEnd()
    {
        if (phase == Win8TouchPhase.Began)
            phase = Win8TouchPhase.Stationnary;

        if (phase == Win8TouchPhase.Moved && _previousPosition == position)
            phase = Win8TouchPhase.Stationnary;

        if (phase == Win8TouchPhase.Ended)
            phase = Win8TouchPhase.Inactive;

        _previousPosition = position;
        _previousTouchTime = touchTime;
    }
Beispiel #3
0
 public void TouchUp(MarshalledTouchEvent mTouch)
 {
     phase = Win8TouchPhase.Ended;
     position = new Vector2(mTouch.x, (Screen.height - mTouch.y + PIXEL_Y_CORRECTION));
     touchTime = Time.time;
 }