示例#1
0
 void DoneBlockSequence()
 {
     Debug.Log($"{TuxLog.Prefix} <color=purple><b>Experiment Complete!</b></color>");
     ExperimentEvents.BlockSequenceHasCompleted(blocks);
     ExperimentEvents.EndExperiment();
     Running = false;
     OnDisable();
 }
示例#2
0
 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);
 }
示例#3
0
        void StartRunningTrial(Trial trial)
        {
            currentlyRunningTrial = trial;
            TuxLog.Log($"{TuxLog.FormatOrange("Starting")} {currentlyRunningTrial.TrialText}");

            ExperimentEvents.StartPart(trial);
            ExperimentEvents.TrialHasStarted(trial);
        }
示例#4
0
        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));
        }
示例#5
0
        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);
        }
示例#6
0
 void FinishTrial()
 {
     ExperimentEvents.UpdateTrial(trialsInSequence, TrialIndex(currentlyRunningTrial));
 }