public void ChangeIndex() { if (index == waveObjects.Length - 1) { index = 0; waveSoundManager.AssingClip(audioSource, clip[index]); } else { index += 1; waveSoundManager.AssingClip(audioSource, clip[index]); } }
private void Awake() { effectsModifier = Camera.main.GetComponent <EffectsModifier>(); humanSoundBehavior = GetComponent <HumanSoundBehavior>(); audioSource = GetComponent <AudioSource>(); waveSoundManager = FindObjectOfType <WaveSoundManager>(); waveSoundManager.AssingClip(audioSource, clips[Random.Range(0, clips.Length)]); startIntensity = 1.0f / newIntensity; }
private void Awake() { audioSource = GetComponent <AudioSource>(); waveSoundManager = FindObjectOfType <WaveSoundManager>(); waveSoundManager.AssingClip(audioSource, clip[index]); }