Beispiel #1
0
    void OnGUI()
    {
        GUILayout.BeginHorizontal();
        GUILayout.Label("Demo App");
        GUILayout.Space(Screen.width - 250);
        GUILayout.Label(signalIcons[(int)indexSignalIcons]);
        GUILayout.EndHorizontal();

        if (GUI.Button(new Rect(190, 20, 100, 80), "Init"))
        {
            UnityThinkGear.Init(true);
        }

        if (GUI.Button(new Rect(190, 140, 100, 80), "Connect"))
        {
            print("Connect Button CLick");
                        #if UNITY_IPHONE
            clearDataArr();
            UnityThinkGear.ScanDevice();
            showListViewFlag = true;
                        #elif UNITY_ANDROID
            UnityThinkGear.StartStream();
                        #endif
        }

        if (GUI.Button(new Rect(190, 250, 100, 80), "Quit"))
        {
            Application.Quit();
        }

        if (showListViewFlag)
        {
            //andrew code;  show device list view;
            GUILayout.BeginArea(new Rect(rectX, rectY, rectWidth, rectHeight));
            windowRect = GUILayout.Window(0, new Rect(rectX, rectY, rectWidth, rectHeight), DeviceListWindow, "Device List");
            GUILayout.EndArea();
        }


        GUILayout.BeginVertical();
        GUILayout.Label("Raw:" + Raw);
        GUILayout.Label("PoorSignal:" + PoorSignal);
        GUILayout.Label("Attention:" + Attention);
        GUILayout.Label("Meditation:" + Meditation);
        GUILayout.Label("Blink:" + Blink);
        GUILayout.Label("Delta:" + Delta);
        GUILayout.Label("Theta:" + Theta);
        GUILayout.Label("LowAlpha:" + LowAlpha);
        GUILayout.Label("HighAlpha:" + HighAlpha);
        GUILayout.Label("LowBeta:" + LowBeta);
        GUILayout.Label("HighBeta:" + HighBeta);
        GUILayout.Label("LowGamma:" + LowGamma);
        GUILayout.Label("HighGamma:" + HighGamma);

        GUILayout.EndVertical();
    }
Beispiel #2
0
    public MindReader()
    {
        _meditation = new FloatReference {
            useConstantValue = true
        };
        _focus = new FloatReference {
            useConstantValue = true
        };

        UnityThinkGear.Init(true);
        UnityThinkGear.StartStream();

        _mindReaderProxy = SetupProxy();
    }
Beispiel #3
0
    void OnGUI()
    {
        GUILayout.BeginHorizontal();
        GUILayout.Label("Demo App");
        GUILayout.Space(Screen.width - 250);
        GUILayout.Label(signalIcons[(int)indexSignalIcons]);
        GUILayout.EndHorizontal();

        if (GUI.Button(new Rect(90, 20, 100, 80), "Init"))
        {
            UnityThinkGear.Init(true);
        }

        if (GUI.Button(new Rect(90, 140, 100, 80), "Start"))
        {
            UnityThinkGear.StartStream();
        }

        if (GUI.Button(new Rect(90, 250, 100, 80), "Quit"))
        {
            Application.Quit();
        }

        GUILayout.BeginVertical();
        GUILayout.Label("Raw:" + Raw);
        GUILayout.Label("PoorSignal:" + PoorSignal);
        GUILayout.Label("Attention:" + Attention);
        GUILayout.Label("Meditation:" + Meditation);
        GUILayout.Label("Blink:" + Blink);
        GUILayout.Label("Delta:" + Delta);
        GUILayout.Label("Theta:" + Theta);
        GUILayout.Label("LowAlpha:" + LowAlpha);
        GUILayout.Label("HighAlpha:" + HighAlpha);
        GUILayout.Label("LowBeta:" + LowBeta);
        GUILayout.Label("HighBeta:" + HighBeta);
        GUILayout.Label("LowGamma:" + LowGamma);
        GUILayout.Label("HighGamma:" + HighGamma);

        GUILayout.EndVertical();
    }
 void Awake()
 {
     UnityThinkGear.Init(true);
     InvokeRepeating("CheckUpdateEvent", 0.0f, 1.0f);
 }
Beispiel #5
0
 public void Init()
 {
     Debug.Log("Init Button Click");
     UnityThinkGear.Init(true);
 }
 void Awake()
 {
     UnityThinkGear.Init(true);
     StartCoroutine(CheckUpdateCoroutine());
 }