void Awake() { _currentAudioSource = GetComponent <AudioSource>(); currentSequence = initialSequence; sequenceIndex = -1; if (playOnAwake) { PlayNext(); } }
private void DoTransition() { currentSequence = nextSequence; sequenceIndex = -1; nextSequence = null; }
/// <summary> /// Transition the argument sequence at the end of the current clip. /// </summary> public void Transition(AudioClipSequence sequence) { willTransition = true; nextSequence = sequence; }
/// <summary> /// Transition to current sequence's nextSequence at the end of the current clip. /// </summary> public void Transition() { willTransition = true; nextSequence = currentSequence.nextSequence; }