public void RemoveOne(UnityEngine.Object rObj) { EventTypeObject rEventObject = null; if (this.mEvents.TryGetValue(rObj, out rEventObject)) { rEventObject.Dispose(); this.mEvents.Remove(rObj); } }
public void UnBinding(UnityEngine.Object rTargetGo, HEventTriggerType rEventType, System.Action <UnityEngine.Object> rEventHandler) { EventTypeObject rEventObject = null; if (this.mEvents.TryGetValue(rTargetGo, out rEventObject)) { rEventObject.RemoveEvent(rEventType, rEventHandler); } if (rEventObject != null && rEventObject.ReferCount == 0) { rEventObject.Dispose(); this.mEvents.Remove(rTargetGo); } }