Exemplo n.º 1
0
        public GraphLine SetLineData(ExecutePoint rightExecutePoint)
        {
            if (graphLine == null)
            {
                graphLine = CreateLineGO().GetComponent <GraphLine>();
            }

            linePoint.start = SelfPosition;
            linePoint.end   = rightExecutePoint.GetComponent <RectTransform>().position;
            graphLine.SetLinePoint(linePoint);
            graphLine.SetExecutePoints(this, rightExecutePoint);

            SetHasLine(true);
            rightExecutePoint.SetHasLine(true);

            return(graphLine);
        }
Exemplo n.º 2
0
        private bool SetLine(List <RaycastResult> result, PointPosition position)
        {
            GameObject targetLinePosition = IsOnExecutePoint(result, position);

            if (targetLinePosition && graphLine)
            {
                linePoint.start = SelfPosition;
                linePoint.end   = targetLinePosition.transform.position;
                graphLine.SetLinePoint(linePoint);
                graphLine.SetExecutePoints(this, targetLinePosition.GetComponent <ExecutePoint>());

                SetHasLine(true);
                targetLinePosition.GetComponent <ExecutePoint>().SetHasLine(true);

                return(true);
            }

            return(false);
        }