This commit is contained in:
Yorick
2015-04-09 00:33:18 +02:00
parent be53c1f138
commit 920fd8117e
2 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -148,7 +148,7 @@ public class Panel extends JPanel implements ActionListener
addMouseWheelListener(new MouseWheel(this));
addFocusListener(new WindowFocusListener(this));
t = new Timer(1000 / 50, this);
t = new Timer(1000 / 5000, this);
}
public int getPanelInfoLength()
+10 -1
View File
@@ -10,6 +10,7 @@ import java.awt.geom.Point2D;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import Agenda.Agenda;
@@ -102,7 +103,7 @@ public class Visitor
{
System.out.println("CurrentTarget: " + target);
System.out.println("FinalTarget: " + finalTarget);
Point2D targetPoint = panel.getWaypoint(target).getAccuratePoint();
Point2D targetPoint = panel.getWaypoint(target).getPosition();
double newRot = Math.atan2(targetPoint.getY() - position.getY(), targetPoint.getX() - position.getX());
@@ -157,8 +158,10 @@ public class Visitor
for (Map.Entry<Integer, int[]> e : options.entrySet())
{
// System.out.println("KEY: " + e.getKey());
for (int i : e.getValue())
{
// System.out.println("VAL: " + i);
if (finalTarget != target)
{
if (finalTarget == i && e.getKey() == target)
@@ -173,9 +176,15 @@ public class Visitor
}
}
}
System.out.println("--------------");
}
}
}
public int getNextWaypoint()
{
return 0;
}
public boolean checkIfOnWaypoint(Panel panel)
{