void Update() { if (SpawnInTime && (timer >= secondsBetweenSpawn)) { StartCoroutine(SpawnWaves()); timer = 0.0f; } if (clip != null && audioPlaying) { waveSoundManager.ChangeVolume(audioSource, volumeStep); } timer += Time.deltaTime; }
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(); } } }