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

            ExperimentEvents.StartPart(trial);
            ExperimentEvents.TrialHasStarted(trial);
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 6
0
 void FinishTrial()
 {
     ExperimentEvents.UpdateTrial(trialsInSequence, TrialIndex(currentlyRunningTrial));
 }