Ejemplo n.º 1
0
    void ProcessKeystroke()
    {
        Response = Input.GetKeyDown(TaskSettingsManager.TaskSettings.ResponseKey);
        var abortTrial = Input.GetKeyDown(TaskSettingsManager.TaskSettings.AbortTrialKeyVal);

        try
        {
            if (Response)
            {
                if (_taskEngine.CurrentBlockType == BlockType.TrialBlock)
                {
                    //if (_taskEngine.CurrentResponseState == ResponseWindow.Open)
                    //{
                    _evalResponse.EvaluateReponse();
                    //    _taskEngine.CurrentResponseState = ResponseWindow.Closed;
                    //}
                }
            }

            if (abortTrial)
            {
                _taskEngine.AbortTrial();
                _configView.Abort();
            }
        }

        catch (System.Exception e)
        {
            int i = 0;
            Debug.Log(e);
        }
    }
Ejemplo n.º 2
0
    void ProcessKeyboardChoice()      // TODO: Really need to use the input manager to help with this; may consider using rewired instead
    {
        try
        {
            //wait for choice
            var choice1 = Input.GetKeyDown(TaskSettingsManager.TaskSettings.Item01KeyVal);
            if (choice1)
            {
                _taskEngine.ItemChosen(ItemChoice.Item1);
            }

            var choice2 = Input.GetKeyDown(TaskSettingsManager.TaskSettings.Item02KeyVal);
            if (choice2)
            {
                _taskEngine.ItemChosen(ItemChoice.Item2);
            }

            var choice3 = Input.GetKeyDown(TaskSettingsManager.TaskSettings.Item03KeyVal);
            if (choice3)
            {
                _taskEngine.ItemChosen(ItemChoice.Item3);
            }

            var choice4 = Input.GetKeyDown(TaskSettingsManager.TaskSettings.Item04KeyVal);
            if (choice4)
            {
                _taskEngine.ItemChosen(ItemChoice.Item4);
            }

            Trigger = Input.GetKeyDown(TaskSettingsManager.TaskSettings.TriggerKeyVal);
            if (Trigger && TaskSettingsManager.TaskSettings.EnableTriggerOnScanner)
            {
                _taskEngine.TriggerOn();
            }

            var abortTrial = Input.GetKeyDown(TaskSettingsManager.TaskSettings.AbortTrialKeyVal);
            if (abortTrial)
            {
                _configView.Abort();
                _taskEngine.AbortTrial();
            }
        }

        catch (System.Exception e)
        {
            int i = 0;
            Debug.Log(e);
        }
    }
Ejemplo n.º 3
0
    void ProcessKeyboardChoice()  // TODO: Really need to use the input manager to help with this; may consider using rewired instead
    {
        try
        {
            var abort = Input.GetKeyDown(TaskSettingsManager.TaskSettings.AbortKeyVal);
            if (abort)
            {
                _taskEngine.AbortTrial();
                _configView.Abort();
            }
        }

        catch (System.Exception e)
        {
            int i = 0;
        }
    }