Example #1
0
 void Start()
 {
     source   = gameObject.AddComponent <AudioSource>();
     objs     = new List <GameObject>();
     Analyser = new WaveAnalyser();
     foreach (var item in audioList)
     {
         item.LoadAudioData();
     }
     source.clip = audioList[0];
     Analyser.Initialize(source);
     source.Play();
     objs.Add(b);
     for (int i = 0; i < 100; i++)
     {
         GameObject toAdd = Instantiate(b, b.transform.position + new Vector3(0.5f * (i + 1), 0, 0), b.transform.rotation);
         objs.Add(toAdd);
     }
 }
Example #2
0
 public void SetEmiterSource(AudioSource src)
 {
     Analyser.Initialize(src);
 }