public void AddLine(int xindex, int yindex, GameLine.LineDirection direction) { GameLine line = new GameLine(xindex, yindex, direction, gameObject.transform); Debug.Log("Adding line: " + xindex + "," + yindex + " " + direction.ToString()); if (direction == GameLine.LineDirection.Up) vertLines.SetLine(xindex, yindex, line); else if (direction == GameLine.LineDirection.Down) vertLines.SetLine(xindex, yindex - 1, line); else if (direction == GameLine.LineDirection.Left) horLines.SetLine(xindex - 1, yindex, line); else horLines.SetLine(xindex, yindex, line); }