Пример #1
0
    protected override void Process(string[] newSample, double timeStamp)
    {
        input     = newSample[0];
        timestamp = timeStamp;
        //Avoid doing heavy processing here, use CoRoutines
        //Obtain necessary information from the Demo_P300_Flashes.cs file.
        GameObject        cubeController = GameObject.Find("HUD_Controller");
        Demo_P300_Flashes p300Flashes    = cubeController.GetComponent <Demo_P300_Flashes>();

        cube_list      = p300Flashes.cube_list;
        default_images = p300Flashes.default_images;
        //Call CoRoutine to do further processing
        if (input == "P300 SingleFlash Ends" || input == "P300 RCFlash Ends")
        {
            StartCoroutine("SelectedCube");
        }
    }
Пример #2
0
    protected override void Process(string[] newSample, double timeStamp)
    {
        //Avoid doing heavy processing here, use CoRoutines
        input     = newSample[0];
        timestamp = timeStamp;

        //Obtain necessary information from the P300_Flashes.cs file.
        GameObject        cubeController = GameObject.Find("P300_Controller");
        Demo_P300_Flashes p300Flashes    = cubeController.GetComponent <Demo_P300_Flashes>();

        cube_list = p300Flashes.cube_list;
        freqHz    = p300Flashes.freqHz;
        //onColour = p300Flashes.onColour;
        //offColour = p300Flashes.offColour;
        numRows     = p300Flashes.numRows;
        cubeIndices = new int[numRows];

        //Call CoRoutine to do further processing
        StartCoroutine("SelectedCube");
    }