コード例 #1
0
    /// <summary>
    /// Call this for each new line drawn
    /// </summary>
    /// <param name="gestureInput"></param>
    public void DrawingInputStart(GestureInput gestureInput)
    {
        switch (gestureInput)
        {
        case GestureInput.Draw:
            if (strokeIndex == -1)
            {
                points = new List <Point>();
            }
            isDrawing = true;
            strokeIndex++;
            break;

        case GestureInput.Cast:
            RecognizeGesture();
            strokeIndex = -1;
            break;

        case GestureInput.Erase:
            strokeIndex = -1;
            isDrawing   = false;
            // clear drawing canvas

            break;
        }
    }
コード例 #2
0
 void Awake()
 {
     instance     = this;
     m_GestureLib = new GestureLibrary(Application.dataPath + "/BHZ.GLIB");
     m_VTLeft     = m_TCLeft.GetComponent <VelocityTracker>();
     m_VTRight    = m_TCRight.GetComponent <VelocityTracker>();
 }