added boolean to singleton
This commit is contained in:
@@ -11,6 +11,20 @@ public enum StaticData {
|
|||||||
INSTANCE;
|
INSTANCE;
|
||||||
private double distanceTraveled = 0;
|
private double distanceTraveled = 0;
|
||||||
private int locationsVisited = 0;
|
private int locationsVisited = 0;
|
||||||
|
private boolean isFollowingRoute = false;
|
||||||
|
private String routeName = "";
|
||||||
|
|
||||||
|
public void followRoute(Route route) {
|
||||||
|
routeName = route.getName();
|
||||||
|
setFollowingRoute(true);
|
||||||
|
}
|
||||||
|
public void setFollowingRoute(boolean followingRoute) {
|
||||||
|
isFollowingRoute = followingRoute;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFollowingRoute() {
|
||||||
|
return isFollowingRoute;
|
||||||
|
}
|
||||||
|
|
||||||
private ArrayList<String> visitedNames = new ArrayList<>();
|
private ArrayList<String> visitedNames = new ArrayList<>();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user