예제 #1
0
        public void RemoveOne(UnityEngine.Object rObj)
        {
            EventTypeObject rEventObject = null;

            if (this.mEvents.TryGetValue(rObj, out rEventObject))
            {
                rEventObject.Dispose();
                this.mEvents.Remove(rObj);
            }
        }
예제 #2
0
        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);
            }
        }