Пример #1
0
    void OnGUI()
    {
        GUILayout.BeginHorizontal();


        if (GUILayout.Button("Connect"))
        {
            controller.Connect();
        }
        if (GUILayout.Button("DisConnect"))
        {
            controller.Disconnect();
            indexSignalIcons = 1;
        }

        GUILayout.Space(Screen.width - 250);
        GUILayout.Label(signalIcons[indexSignalIcons]);

        GUILayout.EndHorizontal();


        GUILayout.Label("PoorSignal1:" + poorSignal1);
        GUILayout.Label("Attention1:" + attention1);
        GUILayout.Label("Meditation1:" + meditation1);
        GUILayout.Label("Delta:" + delta);
    }
    void OnGUI()
    {
        GUILayout.BeginHorizontal();


        if (GUILayout.Button("Connect"))
        {
            controller.Connect();
        }
        if (GUILayout.Button("DisConnect"))
        {
            controller.Disconnect();
            indexSignalIcons = 1;
        }

        GUILayout.Space(Screen.width - 250);
        //GUILayout.Label(signalIcons[indexSignalIcons]);

        GUILayout.EndHorizontal();
        // Generate Randome Data 30%
        if (Random.Range(1, 101) < 10)
        {
            poorSignal1 = Random.Range(80, 95);
        }
        if (Random.Range(1, 101) < 10)
        {
            attention1 = Random.Range(60, 80);
        }
        if (Random.Range(1, 101) < 10)
        {
            meditation1 = Random.Range(15, 25);
        }
        if (Random.Range(1, 101) < 3)
        {
            eyestren = Random.Range(30, 80);
        }



        GUILayout.Label("Signal Power:" + poorSignal1);
        GUILayout.Label("Attention:" + attention1);
        GUILayout.Label("Meditation:" + meditation1);
        if (eyestren >= 74)
        {
            GUILayout.Label("Eye Blink Detected Strength:" + eyestren);
        }

        else
        {
            GUILayout.Label("Eye Blink Strength:" + eyestren);
        }
    }
Пример #3
0
    void OnGUI()
    {
        GUILayout.BeginHorizontal();


        if (GUILayout.Button("Connect"))
        {
            controller.Connect();
        }
        if (GUILayout.Button("DisConnect"))
        {
            controller.Disconnect();
            indexSignalIcons = 1;
        }

        GUILayout.Space(Screen.width - 250);
        GUILayout.Label(signalIcons[indexSignalIcons]);

        GUILayout.EndHorizontal();
    }
Пример #4
0
 /**
  * <summary>Disconnects the Neurosky headset</summary>
  **/
 public void DisconnectInput()
 {
     InputController.Disconnect();
     ConnectionStatusDisplay.indexSignalIcons = 1;
 }
Пример #5
0
    void OnGUI()
    {
        if (!EEGManager.Instance.useNeuroSky || !ActionManager.Instance.initialized)
        {
            return;
        }

        if (useGUI)
        {
            GUILayout.BeginHorizontal();

            if (GUILayout.Button("Connect"))
            {
                controller.Connect();
            }
            if (GUILayout.Button("DisConnect"))
            {
                controller.Disconnect();
                indexSignalIcons = 1;
            }

            if (usePoorSignal)
            {
                GUILayout.Space(Screen.width - 250);
                GUILayout.Label(signalIcons[indexSignalIcons]);
            }

            GUILayout.EndHorizontal();

            if (usePoorSignal)
            {
                GUILayout.Label("PoorSignal:" + poorSignal);
            }

            if (useAttention)
            {
                GUILayout.Label("Attention:" + attention);
            }

            if (useMeditation)
            {
                GUILayout.Label("Meditation:" + meditation);
            }

            if (useBlink)
            {
                GUILayout.Label("Blink:" + blink);
            }

            if (useDelta)
            {
                GUILayout.Label("Delta:" + delta);
            }

            if (useTheta)
            {
                GUILayout.Label("Theta:" + theta);
            }

            if (useLowAlpha)
            {
                GUILayout.Label("Low Alpha:" + lowAlpha);
            }

            if (useHighAlpha)
            {
                GUILayout.Label("High Alpha:" + highAlpha);
            }

            if (useLowBeta)
            {
                GUILayout.Label("Low Beta:" + lowBeta);
            }

            if (useHighBeta)
            {
                GUILayout.Label("High Beta:" + highBeta);
            }

            if (useLowGamma)
            {
                GUILayout.Label("Low Gamma:" + lowGamma);
            }

            if (useHighGamma)
            {
                GUILayout.Label("High Gamma:" + highGamma);
            }
        }
    }