mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Fixed merge errors and reimplemented handling multiplier
#story[1274]
This commit is contained in:
@@ -122,7 +122,7 @@ public class BoatCustomizeController implements Initializable{
|
||||
}
|
||||
|
||||
public void setCurrentBoat(String boatType) {
|
||||
currentBoat = boatType;
|
||||
currentBoat = BoatMeshType.valueOf(boatType);
|
||||
displayCurrentBoat();
|
||||
refreshStatBars(currentBoat);
|
||||
}
|
||||
@@ -155,7 +155,7 @@ public class BoatCustomizeController implements Initializable{
|
||||
boatPane.getChildren().add(group);
|
||||
BoatModel bo = ModelFactory.boatCustomiseView(currentBoat, colorPicker.getValue());
|
||||
group.getChildren().add(bo.getAssets());
|
||||
refreshStatBars(bo);
|
||||
refreshStatBars(currentBoat);
|
||||
}
|
||||
|
||||
private void generateMaxStats() {
|
||||
@@ -172,9 +172,9 @@ public class BoatCustomizeController implements Initializable{
|
||||
}
|
||||
}
|
||||
|
||||
private void refreshStatBars(BoatModel bo) {
|
||||
speedBar.setProgress((bo.getMeshType().maxSpeedMultiplier) / maxSpeedMultiplier);
|
||||
accelBar.setProgress(bo.getMeshType().accelerationMultiplier / maxAcceleration);
|
||||
handleBar.setProgress(bo.getMeshType().turnStep / maxTurnRate);
|
||||
private void refreshStatBars(BoatMeshType bo) {
|
||||
speedBar.setProgress((bo.maxSpeedMultiplier) / maxSpeedMultiplier);
|
||||
accelBar.setProgress(bo.accelerationMultiplier / maxAcceleration);
|
||||
handleBar.setProgress(bo.turnStep / maxTurnRate);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user