Points now last whole race with a lower opacity #Story[25]
This commit is contained in:
@@ -265,9 +265,6 @@ public class BoatInRace extends Boat {
|
||||
nextValidTime = currentTime + TRACK_POINT_TIME_INTERVAL;
|
||||
track.add(new TrackPoint(coordinate, currentTime, TRACK_POINT_LIMIT * TRACK_POINT_TIME_INTERVAL));
|
||||
}
|
||||
if (track.size() > 0 && track.element().getTimeAdded() + TRACK_POINT_LIMIT * TRACK_POINT_TIME_INTERVAL <= currentTime) {
|
||||
track.remove();
|
||||
}
|
||||
return added;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,6 @@ public class TrackPoint {
|
||||
}
|
||||
|
||||
public double getAlpha() {
|
||||
if (System.currentTimeMillis() >= timeAdded + expiry) {
|
||||
return 0;
|
||||
}
|
||||
return Double.max(minAlpha,1.0 - (double)(System.currentTimeMillis() - timeAdded) / expiry);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user