Beispiel #1
0
        private static IEnumerator IStartEndlessSession()
        {
            MenuState.I.GoToSongPage();
            ResetIndex();
            SongSelect select = null;

            while (select is null)
            {
                select = GameObject.FindObjectOfType <SongSelect>();
                yield return(new WaitForSecondsRealtime(0.2f));
            }
            if (!CanPlay(select))
            {
                PlaylistManager.state = PlaylistManager.PlaylistState.None;
                yield break;
            }

            previousNoFail = PlayerPreferences.I.NoFail.mVal;
            PlayerPreferences.I.NoFail.mVal = Config.NoFail;
            pendingReset = true;
            if (Config.Shuffle)
            {
                songs.Shuffle();
            }

            SetNextSong();
            MelonCoroutines.Start(ILaunch());
            yield return(null);
        }