Ejemplo n.º 1
0
    private void Init()
    {
        numberOfTrials = configuration.GetNumberOfTrials();

        stimuliManager.SetStimuliAndPositions(
            configuration.GetStimuliTextures(currentTrialNumber),
            configuration.GetStimuliPositions(currentTrialNumber),
            configuration.GetTrialItemSize(currentTrialNumber)
            );

        string dtString = DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss_");

        if (PlayerPrefs.GetString("config").ToLower().Contains("practice"))
        {
            dtString += "practice_";
        }
        string logFilename = Path.Combine(configuration.LogFolder, dtString + configuration.ParticipantID + "_position_data_coordinates.txt");

        logFile = new StreamWriter(logFilename);
        string actualCoordinatesLogFilename = Path.Combine(configuration.LogFolder, dtString + configuration.ParticipantID + "_actual_coordinates.txt");

        actualCoordinatesLogFile = new StreamWriter(actualCoordinatesLogFilename);

        studyTime = (float)configuration.GetTrialStudyTime(0) / 1000f;
        delayTime = (float)configuration.GetTrialDelayTime(0) / 1000f;

        advanceKey = configuration.NextTrialKey;
    }