Example #1
0
 private void OnDisable()
 {
     Instance = null;
     //unsubscribe from audiofile beat events
     if (useAudioFile)
     {
         AudioFileEventListener.OnBeatRecognized -= SpawnOrb;
     }
     else
     {
         AudioEventListener.OnBeatRecognized -= SpawnOrb;
     }
 }
Example #2
0
 private void OnEnable()
 {
     Instance = this;
     //subscribe to audiofile beat events
     if (useAudioFile)
     {
         AudioFileEventListener.OnBeatRecognized += SpawnOrb;
     }
     else
     {
         AudioEventListener.OnBeatRecognized += SpawnOrb;
     }
 }