void LoadSong(Song song, bool awake = false) { if (lastLoadedFile != string.Empty) { isDirty = false; } MenuBar menuBar = uiServices.menuBar; if (awake) { MenuBar.currentInstrument = Song.Instrument.Guitar; MenuBar.currentDifficulty = Song.Difficulty.Expert; } else { menuBar.SetInstrument("guitar"); menuBar.SetDifficulty("expert"); } interactionMethodManager.ChangeInteraction(EditorInteractionManager.InteractionType.HighwayObjectEdit); // Load the default chart LoadChart(currentSong.GetChart(MenuBar.currentInstrument, MenuBar.currentDifficulty)); if (AudioManager.StreamIsValid(currentSongAudio.GetAudioStream(Song.AudioInstrument.Song))) { movement.SetPosition(0); } menuBar.LoadCurrentInstumentAndDifficulty(); }
void LoadSong(Song song, bool awake = false) { if (lastLoadedFile != string.Empty) { isDirty = false; } if (awake) { MenuBar.currentInstrument = Song.Instrument.Guitar; MenuBar.currentDifficulty = Song.Difficulty.Expert; } else { menuBar.SetInstrument("guitar"); menuBar.SetDifficulty("expert"); } // Load the default chart LoadChart(currentSong.GetChart(MenuBar.currentInstrument, MenuBar.currentDifficulty)); if (AudioManager.StreamIsValid(currentSong.GetAudioStream(Song.AudioInstrument.Song))) { movement.SetPosition(0); } menuBar.LoadCurrentInstumentAndDifficulty(); }
void LoadSong(Song song, bool awake = false) { if (lastLoadedFile != string.Empty) { isDirty = false; } if (awake) { MenuBar.currentInstrument = Song.Instrument.Guitar; MenuBar.currentDifficulty = Song.Difficulty.Expert; } else { menuBar.SetInstrument("guitar"); menuBar.SetDifficulty("expert"); } // Load the default chart LoadChart(currentSong.GetChart(MenuBar.currentInstrument, MenuBar.currentDifficulty)); #if !BASS_AUDIO // Reset audioSources upon successfull load foreach (AudioSource source in musicSources) { source.clip = null; } // Load audio if (currentSong.musicStream != null) #else if (currentSong.GetBassAudioStream(Song.AudioInstrument.Song) != 0) #endif { movement.SetPosition(0); } menuBar.LoadCurrentInstumentAndDifficulty(); }