示例#1
0
        void Update()
        {
            if (SpawnInTime && (timer >= secondsBetweenSpawn))
            {
                StartCoroutine(SpawnWaves());
                timer = 0.0f;
            }

            if (clip != null && audioPlaying)
            {
                waveSoundManager.ChangeVolume(audioSource, volumeStep);
            }

            timer += Time.deltaTime;
        }
示例#2
0
 private void Update()
 {
     if (recovering)
     {
         waveSoundManager.ChangeVolume(audioSource, volumeStep);
         effectsModifier.ReduceBlur(pixelStep);
         timer += Time.deltaTime;
         if (timer >= recoveryTime)
         {
             humanSoundBehavior.ChangeWavesIntensity(startIntensity);
             waveSoundManager.StopSound(audioSource);
             recovering = false;
             DestroySound();
         }
     }
 }