//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * 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; } }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * Derived Method: On Disappeared //---------------------------------------------------- // : Pretty much the exact same as the base version // of this function. Except that the player input // is only reactivated if there is no other note // to display. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ protected override void OnDisappeared() { sm_rCurrentlyActiveNotes = null; m_bOpened = false; this.gameObject.SetActive(false); if (m_rTransitioningNote != null) { m_rTransitioningNote.Reveal(); } else { TambourineShakeDetector.CheckForShake = true; if (m_bShowSettingsMenuOnClose && SettingsMenuManager.Available) { SettingsMenuManager.Open(); } else { ButtonManager.ToggleAllButtons(true); } } }