Esempio n. 1
0
        public void StartTrial()
        {
            // safety check
            if (_trialStarted)
            {
                return;
            }

            _trialStarted = true;

            FindObjectOfType <VR.HeadsetRecenterer>().Recenter();

            // create trial
            _trial = new TrialData_Conditions
            {
                participant = participant,
                session     = session,
                trialId     = _trialId,
                strategy    = _strategies[_trialId],
                startTime   = Time.time
            };

            // misc stuff
            SetStrategyParameters();
            ShowWords();

            if (_trial.strategy.HasFlag(Strategy.EyeTracking))
            {
                speakers.PlayOneShot(startSound);
            }

            Debug.Log($"Trial {_trialId} starting. Strategy: {_trial.strategy}");
        }
Esempio n. 2
0
 public void NextTrial()
 {
     _trialId = Mathf.Clamp(_trialId + 1, 0, 49);
     _trial   = new TrialData_Conditions
     {
         participant = _participant,
         trialId     = _trialId,
         strategy    = _strategies[_trialId],
         startTime   = Time.time
     };
 }