This commit is contained in:
Yorick
2015-04-08 12:42:12 +02:00
parent 701f2aed4b
commit ad62094ee7
5 changed files with 54 additions and 29 deletions
+9
View File
@@ -14,6 +14,8 @@ import java.util.ArrayList;
import javax.imageio.ImageIO;
import Applicatie.Waypoint;
/**
* Create's a path.
*
@@ -27,6 +29,7 @@ public class Path
private ArrayList<Shape> lines;
private Point2D tempPoint;
private BufferedImage pathBackground;
private ArrayList<Waypoint> waypoints;
/**
* Constructor.
@@ -35,6 +38,7 @@ public class Path
{
points = new ArrayList<>();
lines = new ArrayList<>();
waypoints = new ArrayList<Waypoint>();
try
{
pathBackground = ImageIO.read(new File("images/newPath.png"));
@@ -141,6 +145,11 @@ public class Path
}
return lines;
}
public void addWaypoint(Waypoint w)
{
waypoints.add(w);
}
/**
* Add a point to the path.