mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user