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