Exemplo n.º 1
0
 public void ResetTiltValues()
 {
     StartLerpTime();
     startXLerp = xAxis;
     startYLerp = yAxis;
     resetXLerp = true;
     resetYLerp = true;
     h_drag     = HorizontalDrag.NONE;
     v_drag     = VerticalDrag.NONE;
 }
Exemplo n.º 2
0
    void DragHorizontal(Vector3 position)
    {
        Vector3 vec = position - previousPosition;

        if (vec.x > 0)
        {
            if (h_drag != HorizontalDrag.RIGHT)
            {
                startXTime = Time.time;
                startXLerp = xAxis;
            }
            h_drag = HorizontalDrag.RIGHT;
        }
        else if (vec.x < 0)
        {
            if (h_drag != HorizontalDrag.LEFT)
            {
                startXTime = Time.time;
                startXLerp = xAxis;
            }
            h_drag = HorizontalDrag.LEFT;
        }
    }