Exemplo n.º 1
0
        private IEnumerator CycleThroughAudio(int idx, int numTimes)
        {
            for (int i = 0; i < numTimes; ++i)
            {
                hudAudioController.playAudio(idx);

                yield return(new WaitForSeconds(hudAudioController.audioModel.durations [idx]));
            }
        }
Exemplo n.º 2
0
        // Use this for initialization
        void Start()
        {
            cityAudioModel = new HUDAudioModel();
            cityAudioModel.addClip("Urban-Ambient", 25f);

            cityAudioController = GetComponent <HUDAudioController> ();

            cityAudioController.primaryAudioSource = citySounds;

            cityAudioController.audioModel = cityAudioModel;

            cityAudioController.playAudio(0);
        }