Exemplo n.º 1
0
    void Update()
    {
        Settings.framePublishing.UpdateEyeTextures();

        if (Settings.dataProcess.state == PupilSettings.EStatus.Calibration)
        {
            if (Settings.calibration.initialized)
            {
                PupilTools.Calibrate();
            }
        }
        else if (Settings.connection.subscribeSocket != null)
        {
            Settings.connection.subscribeSocket.Poll();
        }

        if (Input.GetKeyUp(KeyCode.C))
        {
            if (Settings.dataProcess.state == PupilSettings.EStatus.Calibration)
            {
                PupilTools.StopCalibration();
            }
            else
            {
                //LoggerBehavior.SceneStatus = "calibrating";
                PupilTools.StartCalibration();
            }
        }
        if (Input.GetKeyUp(KeyCode.R))
        {
            if (!Recorder.isRecording)
            {
                Recorder.isRecording = true;
                Recorder.Start();
            }
            else
            {
                Recorder.isRecording = false;
                Recorder.Stop();
            }
        }

        if (OnUpdate != null)
        {
            OnUpdate();
        }
    }