public void PlayThroughRhythmList(Playlist ePlaylist, MultipleNotesManager rOwningSheetMusic, float fDelayTime = 0.0f) { // Assign and then close down the Sheet Music m_rOwningSheetMusicNote = rOwningSheetMusic; if (rOwningSheetMusic != null) { rOwningSheetMusic.Disappear(false); } m_bIsInvoked = true; m_eSelectedPlaylist = ePlaylist; m_fStartDelayTime = fDelayTime; }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * New Method: Stop Playback //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public void StopPlayback() { // Not Playing anymore... are we? m_lPlaylist.Clear(); m_bIsPlaying = false; // If there was an owning note (we pressed play from the sheet music notes), then open that note back up. if (m_rOwningSheetMusicNote != null) { m_rOwningSheetMusicNote.Reveal(); m_rOwningSheetMusicNote = null; } // Otherwise just reactivate input from the user. else { ButtonManager.ToggleAllButtons(true); TambourineShakeDetector.CheckForShake = true; } }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * New Method: Disappear //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public void Disappear(TransitioningNote a_rTransitioningNote) { // If transitioning to prev note in the list, then set it up if (a_rTransitioningNote == TransitioningNote.PREVIOUS_NOTE) { m_rTransitioningNote = m_rPreviousNote; this.m_aDisappearAnimationEffect = m_aeRightDisappearAnimation; m_rTransitioningNote.m_aRevealAnimationEffect = m_rTransitioningNote.m_aeLeftRevealAnimation; } // Likewise if it's the next note in the list else { m_rTransitioningNote = m_rNextNote; this.m_aDisappearAnimationEffect = m_aeLeftDisappearAnimation; m_rTransitioningNote.m_aRevealAnimationEffect = m_rTransitioningNote.m_aeRightRevealAnimation; } ButtonManager.ToggleAllButtons(false); base.Disappear(false); }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * Derived Method: On Revealed //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ protected override void OnRevealed() { base.OnRevealed(); m_rTransitioningNote = null; }