stuffff
This commit is contained in:
@@ -12,6 +12,7 @@ public enum RouteHandler {
|
||||
private Route currentRoute;
|
||||
private int stepCount = 0;
|
||||
private RouteFinishedListener routeFinishedListener;
|
||||
private long startedTime;
|
||||
|
||||
private Polyline currentRouteLine;
|
||||
|
||||
@@ -40,11 +41,14 @@ public enum RouteHandler {
|
||||
isFollowingRoute = false;
|
||||
currentRoute = null;
|
||||
currentRouteLine = null;
|
||||
StaticData.INSTANCE.addTimeWalked(System.currentTimeMillis()-startedTime);
|
||||
startedTime = 0;
|
||||
}
|
||||
|
||||
public void followRoute(Route route) {
|
||||
this.currentRoute = route;
|
||||
setFollowingRoute(true);
|
||||
startedTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public boolean isFollowingRoute(Route route) {
|
||||
|
||||
@@ -11,6 +11,7 @@ public enum StaticData {
|
||||
INSTANCE;
|
||||
private double distanceTraveled = 0;
|
||||
private int locationsVisited = 0;
|
||||
private long timeWalkedRoute = 0;
|
||||
|
||||
private ArrayList<String> visitedNames = new ArrayList<>();
|
||||
|
||||
@@ -18,6 +19,14 @@ public enum StaticData {
|
||||
distanceTraveled += d;
|
||||
}
|
||||
|
||||
public long getTimeWalkedRoute() {
|
||||
return timeWalkedRoute;
|
||||
}
|
||||
|
||||
public void addTimeWalked(long time) {
|
||||
timeWalkedRoute += time;
|
||||
}
|
||||
|
||||
|
||||
public double getDistanceTraveled() {
|
||||
return distanceTraveled;
|
||||
|
||||
Reference in New Issue
Block a user