public void UnRegAll() { for (int i = 0; i < mCBLis.Count; i++) { MsgCBStruct msg = mCBLis[i]; mDispatchEvent.UnReg(msg.eventID, msg.CallBack); } mCBLis.Clear(); }
public void UnReg(int eventID) { for (int i = mCBLis.Count - 1; i >= 0; i--) { MsgCBStruct msg = mCBLis[i]; if (msg.eventID == eventID) { mCBLis.RemoveAt(i); } } mDispatchEvent.UnReg(eventID); }
public void UnReg(int eventID, GameEventDelegate.CallBack callBack) { for (int i = 0; i < mCBLis.Count; i++) { MsgCBStruct msg = mCBLis[i]; if (msg.eventID == eventID && msg.CallBack == callBack) { mCBLis.RemoveAt(i); break; } } mDispatchEvent.UnReg(eventID, callBack); }