public void Off(string eventName, DelegateOneParamEvent.EventHandler callback) { if (oneParamMap.ContainsKey(eventName)) { oneParamMap[eventName].removeListener(callback); } }
public void On(string eventName, DelegateOneParamEvent.EventHandler callback) { if (!oneParamMap.ContainsKey(eventName)) { DelegateOneParamEvent delegateEvent = new DelegateOneParamEvent(); oneParamMap.Add(eventName, delegateEvent); } oneParamMap[eventName].addListener(callback); }