public void Handle(UnityEngine.Object rTargetGo, EventTriggerType rEventType) { EventTypeObject rEventObject = null; if (this.mEvents.TryGetValue(rTargetGo, out rEventObject)) { rEventObject.Handle(rEventType); } }
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); } }
public void Binding(UnityEngine.Object rTargetGo, HEventTriggerType rEventType, System.Action <UnityEngine.Object> rEventHandler) { EventTypeObject rEventObject = null; if (!this.mEvents.TryGetValue(rTargetGo, out rEventObject)) { rEventObject = new EventTypeObject(rTargetGo); rEventObject.AddEvent(rEventType, rEventHandler); mEvents.Add(rTargetGo, rEventObject); } else { rEventObject.AddEvent(rEventType, rEventHandler); } }