Removed broken time extracting method and replaced it with currently existing long extractor. Added speed to the setDestination method for the raceObject abstract class.

#story[820]
This commit is contained in:
Kusal Ekanayake
2017-05-01 18:22:08 +12:00
parent 1d47df09eb
commit d927531354
6 changed files with 43 additions and 45 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, int... raceIds) {
public void setDestination (double newXValue, double newYValue, double rotation, double speed, int... raceIds) {
if (hasRaceId(raceIds)) {
destinationSet = true;
boat.setVelocity(StreamParser.boatSpeeds.get((long)boat.getId()));
boat.setVelocity(speed);
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, int... raceIDs) {
public void setDestination (double newXValue, double newYValue, double speed, int... raceIDs) {
destinationSet = true;
if (hasRaceId(raceIDs)) {
@@ -237,7 +237,7 @@ public class BoatGroup extends RaceObject{
)
)
);
setDestination(newXValue, newYValue, rotation, raceIDs);
setDestination(newXValue, newYValue, rotation, speed, raceIDs);
}
}