/// <summary> /// Plays the backgrond music. Will restart music if already playing. /// </summary> void BackgroundMusic() { if (CurrentMusic != null) { CurrentMusic.Destroy(); } SoundEffect mus = Sounds.GetSound(CVars.a_music.Value); Sounds.Play(mus, true, Location.NaN, CVars.a_musicpitch.ValueF, CVars.a_musicvolume.ValueF, 0, (asfx) => { CurrentMusic = asfx; }); }
// play \ pause private void DButtonPlayPause_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { if (soundEngine.IS_PLAY == false) { soundEngine.Play(); ButtonPlayPause.SetIconPlay(); } else { soundEngine.Pause(); ButtonPlayPause.SetIconPause(); } }
public override void PostUpdateMiscEffects() { if (Main.worldName == SpookyTerrariaUtils.slenderWorldName) { Main.bgStyle = (int)SpookyTerrariaUtils.BGStyleID.DefaultForest; player.ZoneJungle = false; player.ZoneDungeon = false; player.ZoneCorrupt = false; player.ZoneCrimson = false; player.ZoneHoly = false; player.ZoneSnow = false; player.ZoneUndergroundDesert = false; player.ZoneGlowshroom = false; player.ZoneMeteor = false; player.ZoneBeach = false; player.ZoneDesert = false; } SoundEngine.Play(); SoundEngine.HandleSoundInstancing(); }
public void StartSoundEngine() { //SoundEngine.PlayPause(1); SoundEngine.Play(); }