public PointInfo GetNextPoint() { counter += 1; var point = Points[counter]; if (point == null) { var previousPoint = Points[counter - 1]; Points[counter] = point = new PointInfo(previousPoint.coordinateX + DirectionX, previousPoint.coordinateY + DirectionY, Points.Length); } return point; }
public PointInfo GetNextPoint() { counter += 1; var point = Points[counter]; if (point == null) { var previousPoint = Points[counter - 1]; Points[counter] = point = new PointInfo(previousPoint.coordinateX + DirectionX, previousPoint.coordinateY + DirectionY, Points.Length); } return(point); }
public void GeneratePoints(int amount) { Points = new PointInfo[amount]; Points[0] = new PointInfo(X, Y, amount); }