visitors kinda working?
This commit is contained in:
@@ -79,8 +79,7 @@ public class MenuBar extends JMenuBar
|
|||||||
{
|
{
|
||||||
public void actionPerformed(ActionEvent e)
|
public void actionPerformed(ActionEvent e)
|
||||||
{
|
{
|
||||||
w.setVisible(false);
|
System.exit(0);
|
||||||
w.dispose();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -637,7 +637,6 @@ public class Panel extends JPanel implements ActionListener
|
|||||||
currentTime++;
|
currentTime++;
|
||||||
date.setTimeInMillis(date.getTimeInMillis() + 1000);
|
date.setTimeInMillis(date.getTimeInMillis() + 1000);
|
||||||
cp.setTime(formatter.format(date.getTime()));
|
cp.setTime(formatter.format(date.getTime()));
|
||||||
System.out.println(currentTime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Visitor v : visitors)
|
for (Visitor v : visitors)
|
||||||
|
|||||||
@@ -101,6 +101,9 @@ public class Visitor
|
|||||||
|
|
||||||
public void move(DrawObject tar, Panel panel)
|
public void move(DrawObject tar, Panel panel)
|
||||||
{
|
{
|
||||||
|
System.out.println("CurrentTarget: " + target);
|
||||||
|
System.out.println("FinalTarget: " + finalTarget);
|
||||||
|
System.out.println(panel.getWaypoints().size());
|
||||||
Point2D targetPoint = panel.getWaypoint(target).getAccuratePoint();
|
Point2D targetPoint = panel.getWaypoint(target).getAccuratePoint();
|
||||||
|
|
||||||
double newRot = Math.atan2(targetPoint.getY() - position.getY(), targetPoint.getX() - position.getX());
|
double newRot = Math.atan2(targetPoint.getY() - position.getY(), targetPoint.getX() - position.getX());
|
||||||
|
|||||||
Reference in New Issue
Block a user