コード例 #1
0
        public void AddLine(
            string lineName,
            double[] xValues,
            double[] yValues,
            Color lineColor,
            int lineThickness,
            bool display = true
            )
        {
            if (allLines.ContainsKey(lineName))
            {
                MonoBehaviour.print("[FAR] [ferramGraph] Error: A Line with that name already exists");
                return;
            }

            if (xValues.Length != yValues.Length)
            {
                MonoBehaviour.print("[FAR] [ferramGraph] Error: X and Y value arrays are different lengths");
                return;
            }

            var newLine = new ferramGraphLine((int)displayRect.width, (int)displayRect.height);

            newLine.InputData(xValues, yValues);
            newLine.SetBoundaries(bounds);
            newLine.lineColor       = lineColor;
            newLine.lineThickness   = lineThickness;
            newLine.backgroundColor = backgroundColor;
            newLine.displayInLegend = display;

            allLines.Add(lineName, newLine);
            Update();
        }
コード例 #2
0
        public void AddLine(string lineName)
        {
            if (allLines.ContainsKey(lineName))
            {
                MonoBehaviour.print("[FAR] [ferramGraph] Error: A Line with that name already exists");
                return;
            }
            ferramGraphLine newLine = new ferramGraphLine((int)displayRect.width, (int)displayRect.height);

            newLine.SetBoundaries(bounds);
            allLines.Add(lineName, newLine);
            Update();
        }
コード例 #3
0
        // ReSharper disable once UnusedMember.Global
        public void RemoveLine(string lineName)
        {
            if (!allLines.ContainsKey(lineName))
            {
                MonoBehaviour.print("[FAR] [ferramGraph] Error: No line with that name exists");
                return;
            }

            ferramGraphLine line = allLines[lineName];

            allLines.Remove(lineName);

            line.ClearTextures();
            Update();
        }
コード例 #4
0
 public void AddLine(string lineName)
 {
     if (allLines.ContainsKey(lineName))
     {
         MonoBehaviour.print("Error: A Line with that name already exists");
         return;
     }
     ferramGraphLine newLine = new ferramGraphLine((int)displayRect.width, (int)displayRect.height);
     newLine.SetBoundaries(bounds);
     allLines.Add(lineName, newLine);
     Update();
 }
コード例 #5
0
        public void AddLine(string lineName, double[] xValues, double[] yValues, Color lineColor, int lineThickness, bool display)
        {
            if (allLines.ContainsKey(lineName))
            {
                MonoBehaviour.print("Error: A Line with that name already exists");
                return;
            }
            if (xValues.Length != yValues.Length)
            {
                MonoBehaviour.print("Error: X and Y value arrays are different lengths");
                return;
            }

            ferramGraphLine newLine = new ferramGraphLine((int)displayRect.width, (int)displayRect.height);
            newLine.InputData(xValues, yValues);
            newLine.SetBoundaries(bounds);
            newLine.lineColor = lineColor;
            newLine.lineThickness = lineThickness;
            newLine.backgroundColor = backgroundColor;
            newLine.displayInLegend = display;

            allLines.Add(lineName, newLine);
            Update();
        }