Exemplo n.º 1
0
 private void SpawnSound()
 {
     waveSoundManager.PlaySound(audioSource, startVolume);
     effectsModifier.ActivateBlurEffect(noiseScale, noiseFreq, noiseSpeed, pixelOffset);
     SearchWaves();
     ChangeWavesIntensity(newIntensity);
     timer      = 0.0f;
     recovering = true;
 }
Exemplo n.º 2
0
 private IEnumerator SpawnWaves()
 {
     waveSoundManager.PlaySound(audioSource, volumeStart);
     audioPlaying = true;
     for (int i = 0; i < numberOfWaves[index]; i++)
     {
         GameObject wave = Instantiate(waveObjects[index], transform.position, Quaternion.identity);
         if (index != 0)
         {
             wave.GetComponent <WaveBehavior>().ActivateMainWave();
         }
         yield return(new WaitForSeconds(secondsBetweenWaves[index]));
     }
 }