Esempio n. 1
0
 /// <summary>
 /// Unsubscribe the specified listener to the Maestro.
 /// </summary>
 /// <param name="listener">Listener (should be a subclass of MusicBehaviour).</param>
 public void Unsubscribe(MusicBehaviour listener)
 {
     if (listeners.Contains(listener))
     {
         listeners.Remove(listener);
         onBeat     -= listener.OnBeat;
         lateOnBeat -= listener.LateOnBeat;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Subscribe the specified listener to the Maestro.
 /// </summary>
 /// <param name="listener">Listener (should be a subclass of MusicBehaviour).</param>
 public void Subscribe(MusicBehaviour listener)
 {
     if (!listeners.Contains(listener))
     {
         listeners.Add(listener);
         onBeat     += listener.OnBeat;
         lateOnBeat += listener.LateOnBeat;
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Unsubscribe the specified listener to the Maestro.
 /// </summary>
 /// <param name="listener">Listener (should be a subclass of MusicBehaviour).</param>
 public void Unsubscribe(MusicBehaviour listener)
 {
     if (listeners.Contains(listener)) {
         listeners.Remove(listener);
         onBeat -= listener.OnBeat;
         lateOnBeat -= listener.LateOnBeat;
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Subscribe the specified listener to the Maestro.
 /// </summary>
 /// <param name="listener">Listener (should be a subclass of MusicBehaviour).</param>
 public void Subscribe(MusicBehaviour listener)
 {
     if (!listeners.Contains(listener)) {
         listeners.Add(listener);
         onBeat += listener.OnBeat;
         lateOnBeat += listener.LateOnBeat;
     }
 }