mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Added new Wind Waker mesh
#implement #story[1293]
This commit is contained in:
@@ -1,19 +1,16 @@
|
||||
package seng302.visualiser;
|
||||
|
||||
import javafx.util.Pair;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import seng302.gameServer.messages.*;
|
||||
import seng302.model.stream.packets.PacketType;
|
||||
import seng302.model.stream.packets.StreamPacket;
|
||||
import seng302.utilities.XMLParser;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.Socket;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.util.zip.CRC32;
|
||||
import java.util.zip.Checksum;
|
||||
|
||||
@@ -30,6 +30,8 @@ public class BoatObject extends Group {
|
||||
private Color colour = Color.BLACK;
|
||||
private Boolean isSelected = false;
|
||||
private Rotate rotation = new Rotate(0, new Point3D(0,0,1));
|
||||
// private Rotate tilt = new Rotate(0, new Point3D(0, 1, 0));
|
||||
private double previousRotation = 0;
|
||||
|
||||
private ReadOnlyDoubleWrapper rotationProperty;
|
||||
|
||||
@@ -89,6 +91,14 @@ public class BoatObject extends Group {
|
||||
private void rotateTo(double heading, boolean sailsIn, double windDir) {
|
||||
rotationProperty.set(heading);
|
||||
rotation.setAngle(heading);
|
||||
// if (heading == previousRotation) {
|
||||
// tilt.setAngle(0);
|
||||
// } else if (heading < previousRotation) {
|
||||
// tilt.setAngle(-10);
|
||||
// } else {
|
||||
// tilt.setAngle(10);
|
||||
// }
|
||||
// previousRotation = heading;
|
||||
wake.getTransforms().setAll(new Rotate(heading, new Point3D(0,0,1)));
|
||||
if (sailsIn) {
|
||||
boatAssets.showSail();
|
||||
|
||||
Reference in New Issue
Block a user