public void addMoves(PenUpdate pu) { List <PenMove> moves = pu.drawPath.GetMoves().ToList(); if (moves.Count == 0) { return; } if (moves.Count == 1) { Debug.LogWarning("why?"); return; } PenMove first = moves[0]; if (!machineConfig.isSameXY(cursor, first.destination)) { if (!isCursorUp) { lines.Add(penUp()); } lines.Add(move(first.destination, 1)); } if (isCursorUp) { lines.Add(penDown()); } PenMove next = moves[1]; lines.Add(move(next.destination, -1)); for (int i = 2; i < moves.Count; ++i) { next = moves[i]; lines.Add(move(next.destination, 0)); } }
public void DrawPenUpdate(PenUpdate pu) { DrawPath(pu.drawPath); }