public void SetMusic(string musicName, Music music) { Musics[musicName] = music; music.Sound.Name = musicName; }
public void ReplaceMusic(string oldMusic, string newMusic) { Musics[oldMusic].Stop(false, 0); Musics[newMusic].Sound.Name = oldMusic; Microsoft.Xna.Framework.Audio.SoundEffect se = Musics[oldMusic].Sound; Musics[oldMusic] = new Music(); Musics[oldMusic].Sound = se; }
public IAsset Load(string musicName, string path, Dictionary<string, string> parameters, ContentManager contenu) { Microsoft.Xna.Framework.Audio.SoundEffect sound = contenu.Load<Microsoft.Xna.Framework.Audio.SoundEffect>(path); Music music = new Music(); music.Sound = sound; Audio.AudioController.SetMusic(musicName, music); return music; }