Пример #1
0
 private IEnumerator LoadLevelFail(string msg)
 {
     HoldOn.Hide();
     Debug.LogError(msg);
     StopAllCoroutines();
     Loading     = false;
     GamePlaying = false;
     StageMusic.Main.Clear();
     BeatMapManager.ClearBeatMap();
     Resources.UnloadUnusedAssets();
     yield return(null);
 }
Пример #2
0
        private IEnumerator LoadLevel(string songPath, string beatMapPath)
        {
            Loading = true;

            StageMusic.Main.Stop();

            RemoveAllNotes(NoteState.None);
            StageScore.Close();

            HoldOn.Show();
            HoldOn.SetProgress(0f / 2f);

            // Load Music
            yield return(LoadSong(songPath));

            HoldOn.SetProgress(1f / 2f);

            // Load Beat Map
            yield return(LoadBeatMap(beatMapPath));

            HoldOn.SetProgress(2f / 2f);

            HoldOn.Hide();
            Resources.UnloadUnusedAssets();

            TheStageSetting.AutoPlay = TheStageSetting.AutoPlayIsOn;

            GamePlaying = true;

            yield return(new WaitForSeconds(0.5f));

            RemoveAllNotes();
            yield return(new WaitForSeconds(0.5f));


            // Ready -- Go --

            StageMusic.Main.Play();
            StageMicrophone.MicrophoneStart(Mathf.CeilToInt(StageMusic.Main.Length));

            Loading = false;
            yield return(null);
        }
Пример #3
0
 void Awake()
 {
     Main = this;
     Hide();
 }