Beispiel #1
0
        protected virtual void OnDisable()
        {
            eventDispatcher.RemoveListener <DragCompletedEvent>(OnDragCompletedEvent);
            eventDispatcher.RemoveListener <DragEntered.DragEnteredEvent>(OnDragEnteredEvent);
            eventDispatcher.RemoveListener <DragExited.DragExitedEvent>(OnDragExitedEvent);

            if (draggableObject != null)
            {
                draggableObject.UnregisterHandler(this);
            }

            eventDispatcher = null;
        }
        protected virtual void OnDisable()
        {
            if (Application.isPlaying)
            {
                eventDispatcher.RemoveListener <DragCompletedEvent>(OnDragCompletedEvent);
                eventDispatcher.RemoveListener <DragEntered.DragEnteredEvent>(OnDragEnteredEvent);
                eventDispatcher.RemoveListener <DragExited.DragExitedEvent>(OnDragExitedEvent);

                foreach (Draggable2D dragObj in draggableObjects)
                {
                    dragObj.UnregisterHandler(this);
                }

                eventDispatcher = null;
            }
        }
Beispiel #3
0
        protected virtual void OnDisable()
        {
            if (Application.isPlaying)
            {
                eventDispatcher.RemoveListener <DragExitedEvent>(OnDragEnteredEvent);

                eventDispatcher = null;
            }
        }
Beispiel #4
0
        protected virtual void OnDisable()
        {
            eventDispatcher.RemoveListener <ObjectClickedEvent>(OnObjectClickedEvent);

            eventDispatcher = null;
        }
Beispiel #5
0
        protected virtual void OnDisable()
        {
            eventDispatcher.RemoveListener <DragStartedEvent>(OnDragStartedEvent);

            eventDispatcher = null;
        }