public static VibrateForLength ( MyoVibrateLength length ) : void | ||
length | MyoVibrateLength | |
return | void |
void OnGUI() { GUI.BeginGroup(new Rect(10, 10, 300, 500)); if (GUILayout.Button("Present Pairing", GUILayout.MinWidth(300), GUILayout.MinHeight(50))) { MyoManager.PresentPairing(); } if (GUILayout.Button("Attach to Adjacent", GUILayout.MinWidth(300), GUILayout.MinHeight(50))) { MyoManager.AttachToAdjacent(); } if (GUILayout.Button("Vibrate Short", GUILayout.MinWidth(300), GUILayout.MinHeight(50))) { MyoManager.VibrateForLength(MyoVibrateLength.SHORT); } if (GUILayout.Button("Vibrate Medium", GUILayout.MinWidth(300), GUILayout.MinHeight(50))) { MyoManager.VibrateForLength(MyoVibrateLength.MEDIUM); } if (GUILayout.Button("Vibrate Long", GUILayout.MinWidth(300), GUILayout.MinHeight(50))) { MyoManager.VibrateForLength(MyoVibrateLength.LONG); } GUILayout.Label("Myo Quaternion: " + myoRotation.ToString(), GUILayout.MinWidth(300), GUILayout.MinHeight(30)); GUILayout.Label("Myo Pose: " + myoPose.ToString(), GUILayout.MinWidth(300), GUILayout.MinHeight(30)); GUI.EndGroup(); }
IEnumerator isWOHold() { if (myoPose == MyoPose.WAVE_OUT) { yield return(new WaitForSeconds(0.5f)); if (myoPose == MyoPose.WAVE_OUT) { yield return(new WaitForSeconds(0.5f)); if (myoPose == MyoPose.WAVE_OUT) { yield return(new WaitForSeconds(0.5f)); if (myoPose == MyoPose.WAVE_OUT) { yield return(new WaitForSeconds(0.5f)); if (myoPose == MyoPose.WAVE_OUT) { yield return(new WaitForSeconds(0.5f)); if (myoPose == MyoPose.WAVE_OUT) { MyoManager.VibrateForLength(MyoVibrateLength.SHORT); mainScript.TapControl(); locked = !locked; StartCoroutine("registerClavo"); } else { mainScript.Adelante(); } } else { mainScript.Adelante(); } } else { mainScript.Adelante(); } } else { mainScript.Adelante(); } } else { mainScript.Adelante(); } } else { mainScript.Adelante(); } }
IEnumerator isWIHold() { if (myoPose == MyoPose.WAVE_IN) { yield return(new WaitForSeconds(0.5f)); if (myoPose == MyoPose.WAVE_IN) { yield return(new WaitForSeconds(0.5f)); if (myoPose == MyoPose.WAVE_IN) { yield return(new WaitForSeconds(0.5f)); if (myoPose == MyoPose.WAVE_IN) { yield return(new WaitForSeconds(0.5f)); if (myoPose == MyoPose.WAVE_IN) { yield return(new WaitForSeconds(0.5f)); if (myoPose == MyoPose.WAVE_IN) { MyoManager.VibrateForLength(MyoVibrateLength.SHORT); mainScript.TapControl(); locked = !locked; registerScript.calibrarBroca(); } else { mainScript.Atras(); } } else { mainScript.Atras(); } } else { mainScript.Atras(); } } else { mainScript.Atras(); } } else { mainScript.Atras(); } } else { mainScript.Atras(); } }
IEnumerator isFistHold() { if (myoPose == MyoPose.FIST) { yield return(new WaitForSeconds(0.5f)); if (myoPose == MyoPose.FIST) { yield return(new WaitForSeconds(0.5f)); if (myoPose == MyoPose.FIST) { yield return(new WaitForSeconds(0.5f)); if (myoPose == MyoPose.FIST) { yield return(new WaitForSeconds(0.5f)); if (myoPose == MyoPose.FIST) { yield return(new WaitForSeconds(0.5f)); if (myoPose == MyoPose.FIST) { MyoManager.VibrateForLength(MyoVibrateLength.SHORT); mainScript.TapControl(); locked = !locked; StartCoroutine("registerFemur"); } else { mainScript.SelectMyo(); } } else { mainScript.SelectMyo(); } } else { mainScript.SelectMyo(); } } else { mainScript.SelectMyo(); } } else { mainScript.SelectMyo(); } } else { mainScript.SelectMyo(); } }
void OnGUI() { GUI.BeginGroup(new Rect(10, 10, 300, 500)); if (GUILayout.Button("Attach to Adjacent", GUILayout.MinWidth(300), GUILayout.MinHeight(50))) { MyoManager.AttachToAdjacent(); } if (GUILayout.Button("Vibrate Short", GUILayout.MinWidth(300), GUILayout.MinHeight(50))) { MyoManager.VibrateForLength(MyoVibrateLength.SHORT); } if (GUILayout.Button("Vibrate Medium", GUILayout.MinWidth(300), GUILayout.MinHeight(50))) { MyoManager.VibrateForLength(MyoVibrateLength.MEDIUM); } if (GUILayout.Button("Vibrate Long", GUILayout.MinWidth(300), GUILayout.MinHeight(50))) { MyoManager.VibrateForLength(MyoVibrateLength.LONG); } if (!MyoManager.GetIsInitialized()) { if (GUILayout.Button("Initialize MyoPlugin", GUILayout.MinWidth(300), GUILayout.MinHeight(50))) { MyoManager.Initialize(); } } else { if (GUILayout.Button("Uninitialize MyoPlugin", GUILayout.MinWidth(300), GUILayout.MinHeight(50))) { MyoManager.Uninitialize(); } } GUILayout.Label("Myo Quaternion: " + myoRotation.ToString(), GUILayout.MinWidth(300), GUILayout.MinHeight(30)); GUILayout.Label("Myo Pose: " + myoPose.ToString(), GUILayout.MinWidth(300), GUILayout.MinHeight(30)); GUILayout.Label("Initialized: " + MyoManager.GetIsInitialized(), GUILayout.MinWidth(300), GUILayout.MinHeight(30)); GUILayout.Label("Attached: " + MyoManager.GetIsAttached(), GUILayout.MinWidth(300), GUILayout.MinHeight(30)); GUI.EndGroup(); }
IEnumerator registerClavo() { registerScript.registrarClavo0(); yield return(new WaitForSeconds(5)); registerScript.registrarClavo1(); MyoManager.VibrateForLength(MyoVibrateLength.SHORT); yield return(new WaitForSeconds(5)); registerScript.registrarClavo2(); MyoManager.VibrateForLength(MyoVibrateLength.SHORT); yield return(new WaitForSeconds(5)); registerScript.registrarClavo3(); MyoManager.VibrateForLength(MyoVibrateLength.SHORT); }
IEnumerator registerFemur() { registerScript.registrarFemur0(); yield return(new WaitForSeconds(5)); registerScript.registrarFemur1(); MyoManager.VibrateForLength(MyoVibrateLength.SHORT); yield return(new WaitForSeconds(5)); registerScript.registrarFemur2(); MyoManager.VibrateForLength(MyoVibrateLength.SHORT); yield return(new WaitForSeconds(5)); registerScript.registrarFemur3(); MyoManager.VibrateForLength(MyoVibrateLength.SHORT); }