mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-15 18:27:57 +07:00
Moved comparator to a declaration
This commit is contained in:
@ -90,13 +90,14 @@ public class WaygatePanel extends WidgetGroup implements Disposable {
|
|||||||
waypoints[level.Act].add(level);
|
waypoints[level.Act].add(level);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Comparator<Levels.Entry> comparator = new Comparator<Levels.Entry>() {
|
||||||
|
@Override
|
||||||
|
public int compare(Levels.Entry o1, Levels.Entry o2) {
|
||||||
|
return o1.Waypoint - o2.Waypoint;
|
||||||
|
}
|
||||||
|
};
|
||||||
for (Array<Levels.Entry> waypoint : waypoints) {
|
for (Array<Levels.Entry> waypoint : waypoints) {
|
||||||
waypoint.sort(new Comparator<Levels.Entry>() {
|
waypoint.sort(comparator);
|
||||||
@Override
|
|
||||||
public int compare(Levels.Entry o1, Levels.Entry o2) {
|
|
||||||
return o1.Waypoint - o2.Waypoint;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final Tab[] tabs = new Tab[5];
|
final Tab[] tabs = new Tab[5];
|
||||||
|
Reference in New Issue
Block a user