Esempio n. 1
0
 public void remove_listener(string message_name, Message_Callback callback)
 {
     if (message_callbacks.ContainsKey(message_name)) {
     List<Message_Callback> callbacks = message_callbacks[message_name];
     for (int i = 0; i < callbacks.Count; ++i) {
       if (callbacks[i] == callback) {
     callbacks.RemoveAt(i);
     return;
       }
     }
       }
 }
Esempio n. 2
0
 public void add_listener(string message_name, Message_Callback callback)
 {
     if (!message_callbacks.ContainsKey(message_name))
     message_callbacks[message_name] = new List<Message_Callback>();
       message_callbacks[message_name].Add(callback);
 }
Esempio n. 3
0
 public virtual void remove_listener(string message_name, Message_Callback callback)
 {
     message_dispatcher.remove_listener(message_name, callback);
 }