public void Start() { int songIndex = SongSelectionData.Instance.SelectedSongIndex; int diffIndex = SongSelectionData.Instance.SelectedDiffIndex; SongAudioPair pair = SongData.Instance.GetSongByIndex(songIndex); MusicPlayer.Instance.SetAudioClip(pair.audioclip); MusicPlayer.Instance.SetSongData(pair.song); MusicPlayer.Instance.ResetBeatListeners(); FindObjectOfType <Player>().LoadNotes(pair.song.datas[diffIndex].noteList); StartCoroutine(StartNextFrame()); }
private void Start() { SongAudioPair pair = SongData.Instance.GetSongByIndex(SongSelectionData.Instance.SelectedSongIndex); List <string> names = new List <string>(); for (int i = 0; i < pair.song.datas.Length; i++) { names.Add(pair.song.datas[i].difficulty); } m_Menu.BuildMenu(names.ToArray()); m_Menu.OnChoose += RecieveDifficulty; }