Пример #1
0
        /// <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;
            });
        }
Пример #2
0
 // 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();
     }
 }
Пример #3
0
 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();
 }
Пример #4
0
 public void StartSoundEngine()
 {
     //SoundEngine.PlayPause(1);
     SoundEngine.Play();
 }