Refactoring and documentation

#story[820]
This commit is contained in:
Kusal Ekanayake
2017-05-02 14:08:25 +12:00
parent cd78c35bf6
commit 178af141f0
4 changed files with 63 additions and 27 deletions
+4 -4
View File
@@ -179,10 +179,10 @@ public class BoatGroup extends RaceObject{
* @param rotation Rotation to move graphics to.
* @param raceIds RaceID of the object to move.
*/
public void setDestination (double newXValue, double newYValue, double rotation, double speed, int... raceIds) {
public void setDestination (double newXValue, double newYValue, double rotation, double groundSpeed, int... raceIds) {
if (hasRaceId(raceIds)) {
destinationSet = true;
boat.setVelocity(speed);
boat.setVelocity(groundSpeed);
if (currentRotation < 0)
currentRotation = 360 - currentRotation;
double dx = newXValue - boatPoly.getLayoutX();
@@ -226,7 +226,7 @@ public class BoatGroup extends RaceObject{
}
}
public void setDestination (double newXValue, double newYValue, double speed, int... raceIDs) {
public void setDestination (double newXValue, double newYValue, double groundSpeed, int... raceIDs) {
destinationSet = true;
if (hasRaceId(raceIDs)) {
@@ -237,7 +237,7 @@ public class BoatGroup extends RaceObject{
)
)
);
setDestination(newXValue, newYValue, rotation, speed, raceIDs);
setDestination(newXValue, newYValue, rotation, groundSpeed, raceIDs);
}
}