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