public void Awake()
    {
        buttonInteract.SetActive(false);

        StartCoroutine(AudioFadeOut.FadeIn(music, 1f));

        inDoor = false;
    }
Example #2
0
 private void UpdateMusic()
 {
     if (!this.m_MusicPlaying && Time.time - this.m_StartTime > 1.5f)
     {
         GreenHellGame.Instance.m_Settings.ApplySettings(false);
         Music.Get().PlayByName("main_menu", true, 1f, 0);
         Music.Get().m_Source[0].volume = 0f;
         base.StartCoroutine(AudioFadeOut.FadeIn(Music.Get().m_Source[0], 2f, 1f, null));
         this.m_MusicPlaying = true;
     }
 }
Example #3
0
 protected override void OnTriggerEnter(Collider other)
 {
     base.OnTriggerEnter(other);
     if (other.gameObject == Camera.main.gameObject)
     {
         this.m_IsPlayerInside = true;
         if (this.m_Active)
         {
             if (this.m_StereoLoopCoroutine != null)
             {
                 base.StopCoroutine(this.m_StereoLoopCoroutine);
             }
             this.m_StereoLoopCoroutine = base.StartCoroutine(AudioFadeOut.FadeIn(this.m_AudioSourceLoop2D, 1.5f, 1f, null));
         }
     }
 }
Example #4
0
 private void TurnOn()
 {
     this.m_Active = true;
     this.UpdateEffects();
     this.m_AudioSourceStartStop.clip = Shower.s_StartSound;
     this.m_AudioSourceStartStop.loop = false;
     this.m_AudioSourceStartStop.Play();
     this.m_AudioSourceLoop.clip = Shower.s_LoopSound;
     this.m_AudioSourceLoop.loop = true;
     this.m_AudioSourceLoop.Play();
     base.StartCoroutine(AudioFadeOut.FadeIn(this.m_AudioSourceLoop, 1.5f, 1f, null));
     this.m_AudioSourceLoop2D.clip   = Shower.s_Loop2DSound;
     this.m_AudioSourceLoop2D.loop   = true;
     this.m_AudioSourceLoop2D.volume = 0f;
     if (this.m_IsPlayerInside)
     {
         if (this.m_StereoLoopCoroutine != null)
         {
             base.StopCoroutine(this.m_StereoLoopCoroutine);
         }
         this.m_StereoLoopCoroutine = base.StartCoroutine(AudioFadeOut.FadeIn(this.m_AudioSourceLoop2D, 1.5f, 1f, null));
     }
 }
Example #5
0
 void FadeIn(AudioSource audioSource)
 {
     StartCoroutine(AudioFadeOut.FadeIn(audioSource, 3f));
 }
Example #6
0
    public void FadeIn(float target_volume, float time, int track)
    {
        AudioSource audio_source = this.m_Source[track];

        base.StartCoroutine(AudioFadeOut.FadeIn(audio_source, time, target_volume, null));
    }
Example #7
0
 public void PlayBreathingSound(float volume = 1f, bool loop = false)
 {
     this.m_PlayingBreathSoundSource = this.PlayRandomSound(this.m_BreathSounds, 0f, loop, Noise.Type.None);
     base.StartCoroutine(AudioFadeOut.FadeIn(this.m_PlayingBreathSoundSource, 1f, volume));
 }