void DoneBlockSequence() { Debug.Log($"{TuxLog.Prefix} <color=purple><b>Experiment Complete!</b></color>"); ExperimentEvents.BlockSequenceHasCompleted(blocks); ExperimentEvents.EndExperiment(); Running = false; OnDisable(); }
void StartRunningBlock(Block block) { currentlyRunningBlock = block; Debug.Log(""); TuxLog.Log($"{TuxLog.FormatOrange("Starting")} Block {BlockIndex(currentlyRunningBlock)+1} / {blocks.Count}"); ExperimentEvents.BlockHasStarted(block); ExperimentEvents.StartPart(block); }
void StartRunningTrial(Trial trial) { currentlyRunningTrial = trial; TuxLog.Log($"{TuxLog.FormatOrange("Starting")} {currentlyRunningTrial.TrialText}"); ExperimentEvents.StartPart(trial); ExperimentEvents.TrialHasStarted(trial); }
void FinishBlock() { int blockNum = BlockIndex(currentlyRunningBlock); Debug.Log(""); Debug.Log($"{TuxLog.Prefix} <color=green><b>Finished</b></color> Block {blockNum + 1}\n {currentlyRunningBlock.AsString()}"); currentlyRunningBlock.Complete = true; ExperimentEvents.UpdateBlock(blocks, BlockIndex(currentlyRunningBlock)); }
public void OutputToFile(Outputtable output) { Directory.CreateDirectory(OutputFolder ?? throw new NullReferenceException("Folder could not be created")); using (StreamWriter streamWriter = new StreamWriter(FullPath)) { streamWriter.Write(output.AsString); } ExperimentEvents.OutputSuccessfullyUpdated(FullPath); }
void FinishTrial() { ExperimentEvents.UpdateTrial(trialsInSequence, TrialIndex(currentlyRunningTrial)); }