private void Awake() { audio1 = GameObject.Find("Audio1").transform.position; audio2 = GameObject.Find("Audio2").transform.position; scene = GameObject.Find("Scene").transform.position; partner = GameObject.Find("Meghan@Sitting").transform.position; c = GameObject.Find("Convolution").GetComponent <ConvolutionJob>(); r = GameObject.Find("Room Impulse Response").GetComponent <RoomImpulseResponseJob>(); coordinates = new List <Vector3>(4) { new Vector3(), new Vector3(), new Vector3(), new Vector3() }; challengeDescription.text = helpText; StartCoroutine(FlashTextAnimation()); }
/// <summary> /// Adds audio to the scene. /// </summary> public void AddAudio() { Instantiate(audio1Prefab, audio1, audio1Prefab.transform.rotation); Instantiate(audio2Prefab, audio2, audio2Prefab.transform.rotation); Instantiate(scenePrefab, scene, scenePrefab.transform.rotation); GameObject p = Instantiate(partnerPrefab, new Vector3(partner.x, 0.02f, partner.z), partnerPrefab.transform.rotation); p.GetComponent <MeshRenderer>().enabled = false; ConvolutionJob c = GameObject.Find("Convolution").GetComponent <ConvolutionJob>(); c.AddAudioSource(audio1Prefab.GetComponent <AudioSource>().clip); c.AddAudioSource(audio2Prefab.GetComponent <AudioSource>().clip); c.AddAudioSource(scenePrefab.GetComponent <AudioSource>().clip); c.AddAudioSource(partnerPrefab.GetComponent <AudioSource>().clip); r.ToggleCalculateImpulseResponse(); }