예제 #1
0
        public void SetMusic(string musicName, Music music)
        {
            Musics[musicName] = music;

            music.Sound.Name = musicName;
        }
예제 #2
0
        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;
        }
예제 #3
0
        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;
        }