public virtual void SetDefaults(int index) { if (!Initialized) { ID = index; TrackColor = MMSequence.RandomSequenceColor(); Key = KeyCode.Space; Active = true; State = MMSequenceTrackStates.Idle; Initialized = true; } }
/// <summary> /// Use this method to change this feedback's sequence at runtime /// </summary> /// <param name="newSequence"></param> public virtual void SetSequence(MMSequence newSequence) { Timing.Sequence = newSequence; if (Timing.Sequence != null) { for (int i = 0; i < Timing.Sequence.SequenceTracks.Count; i++) { if (Timing.Sequence.SequenceTracks[i].ID == Timing.TrackID) { _sequenceTrackID = i; } } } }
/// <summary> /// Use this method to change this feedback's sequence at runtime /// </summary> /// <param name="newSequence"></param> public virtual void SetSequence(MMSequence newSequence) { Timing.Sequence = newSequence; if (Timing.Sequence != null) { _sequenceDelayWaitForSeconds = new WaitForSeconds(Timing.DelayBetweenRepeats + Timing.Sequence.Length); for (int i = 0; i < Timing.Sequence.SequenceTracks.Count; i++) { if (Timing.Sequence.SequenceTracks[i].ID == Timing.TrackID) { _sequenceTrackID = i; } } } }