public void ShowNextSongScreen() { if (!_radioNavController.viewControllers.Contains(_nextSongScreenViewController)) { PushViewControllerToNavigationController(_radioNavController, _nextSongScreenViewController, null, true); _nextSongScreenViewController.SetSongInfo(channelInfo.currentSong); IPreviewBeatmapLevel level = SongCore.Loader.CustomBeatmapLevelPackCollectionSO.beatmapLevelPacks.SelectMany(x => x.beatmapLevelCollection.beatmapLevels).FirstOrDefault(x => x.levelID.StartsWith(channelInfo.currentSong.levelId)); if (level != null) { LoadBeatmapLevelAsync(level, (success, beatmapLevel) => { PreviewPlayer.CrossfadeTo(beatmapLevel.beatmapLevelData.audioClip, beatmapLevel.previewStartTime, Math.Max(totalTime - currentTime, beatmapLevel.previewDuration)); }); } } }
public void ShowNextSongScreen() { if (!_radioNavController.viewControllers.Contains(_nextSongScreenViewController)) { PushViewControllerToNavigationController(_radioNavController, _nextSongScreenViewController, null, true); _nextSongScreenViewController.SetSongInfo(channelInfo.currentSong); BeatmapLevelSO level = SongLoader.CustomBeatmapLevelPackCollectionSO.beatmapLevelPacks.SelectMany(x => x.beatmapLevelCollection.beatmapLevels).FirstOrDefault(x => x.levelID.StartsWith(channelInfo.currentSong.levelId)) as BeatmapLevelSO; if (level != null) { SongLoader.Instance.LoadAudioClipForLevel((CustomLevel)level, (levelLoaded) => { PreviewPlayer.CrossfadeTo(levelLoaded.beatmapLevelData.audioClip, levelLoaded.previewStartTime, Math.Max(totalTime - currentTime, levelLoaded.previewDuration)); }); } } }