FOLLOW WAYPOINT WOO

This commit is contained in:
Yorick
2015-04-08 16:13:28 +02:00
parent fc16b4c019
commit d75016f9a9
3 changed files with 22 additions and 16 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 / 10, this);
t = new Timer(1000 / 100, this);
}
public int getPanelInfoLength()
+20 -14
View File
@@ -140,28 +140,34 @@ public class Visitor
}
if (checkIfOnWaypoint(panel))
{
// for(int i : panel.getWaypoint(target).getOptions())
// {
// if(i == finalTarget)
// {
// target = finalTarget;
// }
// }
// ArrayList<int[]> options = new ArrayList<int[]>();
HashMap<Integer, int[]> options = new HashMap<Integer, int[]>();
for (Waypoint w : panel.getWaypoints())
{
options.put(w.getSelf(), w.getOptions());
}
for(Map.Entry<Integer, int[]> e : options.entrySet())
for (Map.Entry<Integer, int[]> e : options.entrySet())
{
System.out.println(e.getKey());
System.out.println("=====================");
for(int i : e.getValue())
for (int i : e.getValue())
{
System.out.println(i);
System.out.println("KEY:" + e.getKey());
System.out.println("VAL:" + i);
System.out.println("TAR: " + target);
System.out.println("____________");
if (finalTarget != target)
{
if (finalTarget == i && e.getKey() == target)
{
target = finalTarget;
break;
}
else if (finalTarget == i)
{
target = e.getKey();
break;
}
}
}
System.out.println("----------");
}
}
+1 -1
View File
@@ -78,7 +78,7 @@ public class Mouse extends MouseAdapter
{
if (o instanceof Waypoint)
{
new WaypointPopup(o);
new WaypointPopup(o, panel);
}
}