using NextMind.Calibration;
using NextMind.NeuroTags;
using System.Collections;
namespace NextMind.Examples.Calibration
{
///
/// The NeuroTag behaviour used during the MonoTarget calibration.
///
public class MonoTargetBehaviour : TagCalibrationBehaviour
{
///
/// The calibration step.
///
private MonoTargetCalibrationStep monoTargetStep;
public void InitFromStep(MonoTargetCalibrationStep step)
{
monoTargetStep = step;
}
///
/// Initialization of the NeuroTags at the very start of the calibration.
///
/// The NeuroTag to initialize.
public override void OnInitialize(NeuroTag tag)
{
}
///
/// This is just needed to hide the loading glow and show the Neurotag when calibration is beginning.
///
/// The NeuroTag used during the trial which will start.
public override IEnumerator OnStartCalibrating(NeuroTag tag)
{
yield return monoTargetStep.StartCoroutine(monoTargetStep.OnTrialBegin(tag));
}
///
/// When a trial is over, warn the monoTargetStep
///
/// The NeuroTag used during the trial which just ends.
public override IEnumerator OnEndCalibrating(NeuroTag tag)
{
yield return monoTargetStep.StartCoroutine(monoTargetStep.OnTrialOver(tag));
}
}
}