private void DrawTransitionsForNode(Node node)
        {
            NodeViewData           nodeViewData    = this.GetViewDataForNode(node);
            IList <NodeTransition> nodeTransitions = this.TargetGraph.GetOutgoingTransitionsForNode(node);

            foreach (NodeTransition nodeTransition in nodeTransitions)
            {
                TransitionViewStyle transitionStyle    = this.GetStyleForTransition(node, nodeTransition);
                TransitionViewData  transitionViewData = nodeViewData.GetViewDataForTransition(nodeTransition.transition);

                IList <Node> targetNodes = nodeTransition.targets.Select(targetId => this.TargetGraph.LoadNodeById(targetId)).ToList();
                foreach (Node targetNode in targetNodes)
                {
                    this.DrawTransitionFromNodeToNode(transitionViewData, node, targetNode, transitionStyle);
                }
            }
        }
Exemplo n.º 2
0
            private void DrawEditingTransitionToMousePoint()
            {
                if (this._node == null)
                {
                    Debug.LogError("DrawEditingTransitionToMousePoint - node is null!");
                    return;
                }

                Vector2            mousePosition      = Event.current.mousePosition;
                NodeViewData       nodeViewData       = this.Context.GetViewDataForNode(this._node);
                TransitionViewData transitionViewData = nodeViewData.GetViewDataForTransition(this._nodeTransition.transition);

                this.Context.DrawTransitionFromPointToPoint(transitionViewData,
                                                            nodeViewData.position + this.Context._panner.Position,
                                                            mousePosition,
                                                            TransitionViewStyle.HIGHLIGHTED);
            }