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; } } } }
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); }
public virtual void remove_listener(string message_name, Message_Callback callback) { message_dispatcher.remove_listener(message_name, callback); }