Ejemplo n.º 1
0
    public void AbortTrial()
    {
        _averageResponseTime         = _totalResponseTime / _reversalIterationCount;                                                                                                                                                                                                                                               // average response time to get correct answer over course of the whole trial
        _averageReversalResponseTime = _totalReversalResponseTime / _reversalCount;                                                                                                                                                                                                                                                // average response time to reversal condition
        averageBaselineResponseTime  = _totalBaselineResponseTime / baselineIterationCount;                                                                                                                                                                                                                                        // baseline block metrics

        _logger.LogReversalSummary("ReversalIterationCount , trialLength , averageResponseTime , reversalCount , averageReversalResponseTime" + Environment.NewLine + _reversalIterationCount + " , " + _timer.CurrentTrialLength + " , " + _averageResponseTime + " , " + _reversalCount + " , " + _averageReversalResponseTime); // summery metrics for whole trial
        _logger.LogBaselineSummary("BaselineIterationCount , trialLength , baselineCorrectCount , baselineIncorrectCount , averageBaselineResponseTime" + Environment.NewLine + baselineIterationCount + " , " + _timer.CurrentTrialLength + " , " + baselineCorrectAttemptCount + " , " + baselineIncorrectAttemptCount + " , " + averageBaselineResponseTime);
        _logger.Term();
    }
Ejemplo n.º 2
0
    //checks if Task is running within Time/Span Limits
    //TODO: will need external clock if we need task to end at predictable point (scanner)
    IEnumerator RunTask()
    {
        if (CurrentTaskType == TaskType.Scanner)
        {
            while (CurrentTaskState == TaskState.WaitForTrigger)
            {
                Choices.SetActive(false);

                _scannerIn.WaitForTrigger();
                yield return(new WaitForSeconds(.005f));
            }

            _logger.Init();

            while ((Time.timeSinceLevelLoad < _taskTimeLimit))
            {
                yield return(StartCoroutine(ShowSpan()));

                yield return(StartCoroutine(CollectResponses()));
            }
        }

        if (CurrentTaskType == TaskType.Standard)
        {
            _logger.Init();

            while ((_currentSpanLength < _maxSpanLimit) && (Time.timeSinceLevelLoad < _taskTimeLimit))
            {
                yield return(StartCoroutine(ShowSpan()));

                yield return(StartCoroutine(CollectResponses()));
            }
        }

        _logger.Term();
        SceneManager.LoadScene("GameEndScreen");
    }
Ejemplo n.º 3
0
 public void AbortTrial()
 {
     _logger.Term();
 }