Ejemplo n.º 1
0
 private void LobbyUI_OnSongLoaded(object sender, SongLoadedArgs e)
 {
     if (e.song != null && e.clip != null)
     {
         WipeCurrentlyLoaded();
         selectedSong  = e.song;
         selectedMusic = e.clip;
         Debug.Log("song loaded");
     }
 }
Ejemplo n.º 2
0
        private async void LoadSong()
        {
            SongInfo  si   = RetrieveNewSong();
            AudioClip clip = await GetAudioClipFromSong(si.pathToMusic);

            if (si != null)
            {
                SongLoadedArgs e = new SongLoadedArgs
                {
                    song = si,
                    clip = clip,
                };
                songLoaded(this, e);
                UpdateSongName(si.name);
            }
        }