Пример #1
0
        protected virtual void monitorHUD_BeginExperimentButtonPressed()
        {
            monitorHUD.DeactivateExperimentConfiguration();

            // Configure (sync) the experiment
            ParticipantId            = monitorHUD.ParticipantId;
            ConditionsOrdering       = monitorHUD.ConditionsOrdering;
            ParticipantIsRightHanded = monitorHUD.ParticipantIsRightHanded;
            OnConfigureExperimentSync();

            // Set the ordering in conditions (sync)
            if (monitorHUD.ConditionsOrdering == 1)
            {
                var mainIndVar = StateController.independentVariables[0];
                mainIndVar.NextCondition();
            }
            else if (monitorHUD.ConditionsOrdering == 2)
            {
                var mainIndVar = StateController.independentVariables[0];
                mainIndVar.NextCondition();
                mainIndVar.NextCondition();
            }

            // Begin (sync) the experiment
            StateController.BeginExperiment();
        }
Пример #2
0
        // TODO: remove, for debug testing only
        protected virtual void Update()
        {
            if (Input.GetKeyUp(KeyCode.B))
            {
                OnConfigureExperimentSync();
                StateController.BeginExperiment();
            }
            if (Input.GetKeyUp(KeyCode.N))
            {
                if (TaskGrid.IsConfigured)
                {
                    TaskGrid.SetCompleted();
                }
                StateController.NextState();
            }
            if (Input.GetKeyUp(KeyCode.A))
            {
                OnActivateTaskSync();
                TaskGrid.Configure();
            }
            if (Input.GetKeyUp(KeyCode.S))
            {
                if (TaskGrid.IsConfigured)
                {
                    TaskGrid.SetCompleted();
                }
            }
            if (Input.GetKeyUp(KeyCode.Space))
            {
                if (TaskGrid.IsConfigured)
                {
                    TaskGrid.SetCompleted();
                }
                StateController.NextState();
                OnActivateTaskSync();
                TaskGrid.Configure();
            }

            if (Input.GetKeyUp(KeyCode.Z))
            {
                SetTaskGridModeSync(TaskGrid.InteractionMode.Zoom);
            }
            if (Input.GetKeyUp(KeyCode.X))
            {
                SetTaskGridModeSync(TaskGrid.InteractionMode.Pan);
            }
            if (Input.GetKeyUp(KeyCode.C))
            {
                SetTaskGridModeSync(TaskGrid.InteractionMode.Select);
            }
            if (Input.GetKeyUp(KeyCode.V))
            {
                SetTaskGridModeSync(TaskGrid.InteractionMode.Zoom | TaskGrid.InteractionMode.Pan | TaskGrid.InteractionMode.Select);
            }
        }
Пример #3
0
        // TODO: remove, for debug testing only
        protected virtual IEnumerator StartTaskDebug()
        {
            yield return(null);

            OnConfigureExperimentSync();
            StateController.BeginExperiment();

            yield return(null);

            StateController.NextState();

            yield return(null);

            OnActivateTaskSync();
            TaskGrid.Configure();
        }