Beispiel #1
0
        private void OnDestroy()
        {
            if (left != null && left.GetTargetDragItem() != null)
            {
                left.GetTargetDragItem().UnsubscribeOnChanged(UpdateLine);
                left.SetHasLine(false);
            }

            if (right != null && right.GetTargetDragItem() != null)
            {
                right.GetTargetDragItem().UnsubscribeOnChanged(UpdateLine);
                right.SetHasLine(false);
            }
        }
Beispiel #2
0
        private void OnDestroy()
        {
            if (left != null && left.GetTargetDragItem() != null)
            {
                left.GetTargetDragItem().UnsubscribeOnChanged(UpdateLine);
                left.SetHasLine(false);
            }

            if (right != null && right.GetTargetDragItem() != null)
            {
                right.GetTargetDragItem().UnsubscribeOnChanged(UpdateLine);
                right.SetHasLine(false);
            }

            if (WorkspaceManager.Instance != null)
            {
                WorkspaceManager.Instance.RemoveLine(this);
            }
        }
Beispiel #3
0
        public void SetExecutePoints(ExecutePoint left, ExecutePoint right)
        {
            this.left  = left;
            this.right = right;
            isSet      = true;

            // Subscribe dragitem's OnChanged event to update line.
            left.GetTargetDragItem().SubscribeOnChanged(UpdateLine);
            right.GetTargetDragItem().SubscribeOnChanged(UpdateLine);
        }
Beispiel #4
0
        public void SetExecutePoints(ExecutePoint left, ExecutePoint right)
        {
            this.left  = left;
            this.right = right;
            isSet      = true;

            leftExecutePointInfo = new ExecutePointInfo(
                left.GetTargetDragItem().GetComponent <GraphItem>().BlockID,
                left.GetExecutePointID
                );

            rightExecutePointInfo = new ExecutePointInfo(
                right.GetTargetDragItem().GetComponent <GraphItem>().BlockID,
                right.GetExecutePointID
                );

            // Subscribe dragitem's OnChanged event to update line.
            left.GetTargetDragItem().SubscribeOnChanged(UpdateLine);
            right.GetTargetDragItem().SubscribeOnChanged(UpdateLine);
        }