FOLLOW WAYPOINT WOO
This commit is contained in:
@@ -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
@@ -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("----------");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ public class Mouse extends MouseAdapter
|
||||
{
|
||||
if (o instanceof Waypoint)
|
||||
{
|
||||
new WaypointPopup(o);
|
||||
new WaypointPopup(o, panel);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user