// ------ 反注册分发入口 public void unregisterEventObject(string tag, BaseEventObject obj) { List <BaseEventObject> tempList; if (dispatchTable.ContainsKey(tag)) { tempList = dispatchTable[tag]; tempList.Remove(obj); dispatchTable[tag] = tempList; } }
// ------ 注册分发入口 public void registerEventObject(string tag, BaseEventObject obj) { List <BaseEventObject> tempList; if (dispatchTable.ContainsKey(tag)) { tempList = dispatchTable[tag]; } else { tempList = new List <BaseEventObject>(); } tempList.Add(obj); dispatchTable[tag] = tempList; }