예제 #1
0
 // Update is called once per frame
 void Update()
 {
     if (!MyoManager.GetIsAttached())
     {
     }
     else
     {
         if (myoPose != lastPose)
         {
             if (myoPose == MyoPose.DOUBLE_TAP)
             {
                 mainScript.TapControl();
                 locked   = !locked;
                 lastPose = myoPose;
             }
             if (myoPose == MyoPose.REST)
             {
                 lastPose = myoPose;
             }
             if (!locked)
             {
                 if (myoPose == MyoPose.FIST)
                 {
                     StartCoroutine("isFistHold");
                     lastPose = myoPose;
                 }
                 if (myoPose == MyoPose.FINGERS_SPREAD)
                 {
                     lastPose = myoPose;
                     mainScript.AbrirMenu();
                 }
                 if (myoPose == MyoPose.WAVE_OUT)
                 {
                     StartCoroutine("isWOHold");
                     lastPose = myoPose;
                 }
                 if (myoPose == MyoPose.WAVE_IN)
                 {
                     StartCoroutine("isWIHold");
                     lastPose = myoPose;
                 }
             }
         }
     }
 }