private MusicEngine() { loaded = false; titleSong = new MySong("titleMusic", "Turn turn around", "Spintronic"); creditsSong = new MySong("creditsMusic", "Hypersmash", "Spintronic"); instance = this; }
/// <summary> /// Change current game music /// </summary> /// <param name="s"></param> public void ChangeMusic(MySong s) { if (s != currentMusic) { ThreadPool.QueueUserWorkItem(delegate(object data) { MediaPlayer.Play(s.Song); MediaPlayer.IsRepeating = true; MusicEngine.Instance.Volume = TGPAContext.Instance.Options.MusicVolume; if (TGPAContext.Instance.Options.ShowMusic) { TGPAContext.Instance.SongInfo = new SongInfo(s.Title, s.Artist); } currentMusic = s; }); } }