예제 #1
0
 private void InitConnectViewer()
 {
     lineHolder           = new GameObject("lineHolder");
     lineHolder.hideFlags = HideFlags.HideInHierarchy;
     this.line            = lineHolder.AddComponent <LineRenderer>();
     line.positionCount   = 1;
     ConnectUtil.UpdateLineStyle(line, lineWight, lineMaterial);
 }
예제 #2
0
        private void WorpLineInfo(string itemA)
        {
            currentMat       = null;
            currentLineWidth = 0;
            foreach (ConnectNode node in lockList)
            {
                var id = Array.FindIndex(node.elements, x => x == itemA);
                if (id >= 0)
                {
                    if (node.lineMaterial)
                    {
                        currentMat = node.lineMaterial;
                    }

                    if (node.lineWight > 0)
                    {
                        currentLineWidth = node.lineWight;
                    }
                }
            }
            ConnectUtil.UpdateLineStyle(line, lineWight, lineMaterial);
        }