Exemplo n.º 1
0
 public void LoopEngineSound()
 {
     if (EngineConfig.SoundEnabled && !engineSound.IsPlaying())
     {
         engineSound.SetBaseGain(0.3f);
         engineSound.Play();
         //SoundManager3D.Instance.UpdateSoundObjects();
     }
 }
Exemplo n.º 2
0
        public void SetMusicVolume(uint volume)
        {
            LogManager.Singleton.LogMessage(LogMessageLevel.LML_CRITICAL, "Changing music volume to: " + volume);

            EngineConfig.MusicVolume = (int)volume;
            if (EngineConfig.MusicVolume == 0)
            {
            }
            if (SoundManager3D.Instance.CurrentMusic != null)
            {
                //SoundManager3D.Instance.CurrentMusic

                ambientSound.SetBaseGain(1.0f * volume / 100.0f);
                // SoundManager3D.Instance.PlayAmbientMusic(SoundManager3D.Instance.CurrentMusic, EngineConfig.MusicVolume);
            }


            EngineConfig.SaveEngineConfig();
        }
Exemplo n.º 3
0
 public void PlayGunSound()
 {
     //LogManager.Singleton.LogMessage(LogMessageLevel.LML_CRITICAL, "START");
     if (EngineConfig.SoundEnabled && !gunSound.IsPlaying())
     {
         // LogManager.Singleton.LogMessage(LogMessageLevel.LML_CRITICAL, " -NEW LOOP");
         gunSound.SetBaseGain(1.0f);
         gunSound.Play();
         //SoundManager3D.Instance.UpdateSoundObjects();
     }
 }
Exemplo n.º 4
0
 public void PlayPlanePass()
 {
     if (EngineConfig.SoundEnabled && !planePassSound.IsPlaying())
     {
         //planePassSound.SetGain(soundObject.GetBaseGain() * volume / 100.0f);
         //planePassSound.SetGain(EngineConfig.SoundVolume / 100.0f);
         planePassSound.SetBaseGain(2.5f);
         planePassSound.Play();
         //     Console.WriteLine("PLAYING :"+planePassSound.Name);
     }
 }