mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Added player position, boat speed, boat heading to race view.
#story[1245]
This commit is contained in:
@@ -519,9 +519,12 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates player position with ordinal number up to 23rd position.
|
||||||
|
*/
|
||||||
private void updatePosition() {
|
private void updatePosition() {
|
||||||
if (player.getPosition() == null) {
|
if (player.getPosition() == null) {
|
||||||
positionLabel.setText("Position:\n0");
|
positionLabel.setText("Position:\n-");
|
||||||
} else {
|
} else {
|
||||||
switch (player.getPosition()) {
|
switch (player.getPosition()) {
|
||||||
case 1:
|
case 1:
|
||||||
@@ -548,12 +551,18 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates boat speed value displayed on race view.
|
||||||
|
*/
|
||||||
private void updateBoatSpeed() {
|
private void updateBoatSpeed() {
|
||||||
boatSpeedLabel.setText("Boat Speed:\n" + String.valueOf(player.getVelocityProperty().toString()));
|
boatSpeedLabel.setText("Boat Speed:\n" + String.valueOf(player.getCurrentVelocity()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates boat heading value displayed on race view.
|
||||||
|
*/
|
||||||
private void updateBoatHeading() {
|
private void updateBoatHeading() {
|
||||||
boatHeadingLabel.setText("Boat Heading:\n" + String.valueOf(player.getHeading()));
|
boatHeadingLabel.setText(String.format("Boat Heading:\n%.1f°", player.getHeading()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user