Beispiel #1
0
 public void UnRegisterListener(IPaletteUpdater source)
 {
     //Debug.Log(Time.frameCount+" unregregistering listener "+source.name,source.gameObject);
     //onPaletteChange-=source.UpdatePalette;
     if (listeners == null)
     {
         listeners = new List <IPaletteUpdater>();
     }
     if (!listeners.Contains(source))
     {
         Debug.Log("list does not contain this object " + source.name, source.gameObject);
     }
     listeners.Remove(source);
 }
Beispiel #2
0
 public void RegisterListener(IPaletteUpdater source)
 {
     if (listeners == null)
     {
         listeners = new List <IPaletteUpdater>();
     }
     if (listeners.Contains(source))
     {
         // Debug.Log(Time.frameCount + " we already have ths soruce", source.gameObject);
     }
     else
     {
         // Debug.Log(Time.frameCount + " adding " + source.name,source.gameObject);
         listeners.Add(source);
     }
 }