VibrateForLength() public static method

public static VibrateForLength ( MyoVibrateLength length ) : void
length MyoVibrateLength
return void
コード例 #1
0
    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();
    }
コード例 #2
0
    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();
        }
    }
コード例 #3
0
    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();
        }
    }
コード例 #4
0
    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();
        }
    }
コード例 #5
0
ファイル: MyoPluginDemo.cs プロジェクト: jphacks/SP_1711
    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();
    }
コード例 #6
0
    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);
    }
コード例 #7
0
    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);
    }