Пример #1
0
        private void InitializeAudioHash(GameTracks gameTracks)
        {
            m_bgmHash = gameTracks.BackgroundMusics.Audios.ToDictionary(x => x.Id, x => x);

            List <Dictionary <string, AudioData> > results = new List <Dictionary <string, AudioData> >();

            foreach (var collection in gameTracks.Collections)
            {
                results.Add(collection.Audios.ToDictionary(x => x.Id, x => x));
            }

            m_collectionsHash = results.SelectMany(x => x)
                                .ToDictionary(x => x.Key, y => y.Value);
        }
Пример #2
0
 public AudioController(GameTracks gameTracks)
 {
     InitializeAudioHash(gameTracks);
 }