Same changes to dev. #story[1311]

main
zwu18 8 years ago
parent 64ae01113a
commit 67779eb9ad

@ -46,10 +46,7 @@ import visualiser.utils.GPSConverter;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.util.Optional;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -295,8 +292,8 @@ public class RaceViewController extends Controller {
.markersVisible(true) // Defines if markers will be visible
//.markers(marker1, marker2) // Defines markers that will be drawn
// Related to Value
.animated(true) // Defines if the needle will be animated
.animationDuration(500) // Defines the speed of the needle in milliseconds (10 - 10000 ms)
//.animated(true) // Defines if the needle will be animated
//.animationDuration(500) // Defines the speed of the needle in milliseconds (10 - 10000 ms)
.build();
/**
@ -764,15 +761,14 @@ public class RaceViewController extends Controller {
try {
gauge.setValue(raceState.getBoat(raceState.getPlayerBoatID()).getCurrentSpeed());
fGauge.getGauge().setValue(raceState.getBoat(raceState.getPlayerBoatID()).getCurrentSpeed());
if(System.currentTimeMillis() > positionTime+positionDelay) {
for (VisualiserBoat boat : boatInfoTable.getItems()) {
if (raceState.getPlayerBoatID() == boat.getSourceID()) {
gauge.setTitle("Position: " + (boatInfoTable.getItems().indexOf(boat) + 1));
fGauge.getGauge().setTitle("Position: " + (boatInfoTable.getItems().indexOf(boat) + 1));
//Thread.sleep(50);
List<VisualiserBoat> boatList = boatInfoTable.getItems();
for (VisualiserBoat boat : boatList){
if(raceState.getPlayerBoatID()==boat.getSourceID()){
gauge.titleProperty().setValue("Position: " + (boatInfoTable.getItems().indexOf(boat)+1));
fGauge.getGauge().titleProperty().setValue("Position: " + (boatInfoTable.getItems().indexOf(boat)+1));
}
}
positionTime = System.currentTimeMillis();
}
} catch (BoatNotFoundException e) {
e.printStackTrace();
}

Loading…
Cancel
Save