public TrialOutput(int num, TrialType type, TrialState state, string stimulusName, List <RecordResponses.Response> response) { this.num = num; this.type = type; this.state = state; this.stimulusName = stimulusName; this.response = response; }
public static Texture GetTexture(this TrialState state, TrialType type, Textures textures) { switch (state) { case TrialState.Cue: return(textures.Get(type.cue)); case TrialState.ISI: return(textures.isi); case TrialState.Probe: return(textures.Get(type.probe)); case TrialState.PreCueITI: return(textures.iti); case TrialState.PreProbeITI: return(textures.iti); default: return(null); } }
public Option <TrialState> HandleResponse(TrialState state, List <RecordResponses.Response> responses, TrialType trialType) { _previousState = state; if (state == TrialState.ISI || state == TrialState.PreCueITI) { if (responses.Count == 0) { return(Option <TrialState> .Create(TrialState.Slow)); } else if (trialType.CheckResponse(state, responses.Last().buttonPressed)) { return(Option <TrialState> .Create(TrialState.Correct)); } else { return(Option <TrialState> .Create(TrialState.Incorrect)); } } return(Option <TrialState> .CreateEmpty()); }