Fixed boats moving in the correct heading as according to the stream and attempted to fix the wakes direction.

#story[818]
This commit is contained in:
Kusal Ekanayake
2017-04-27 18:52:37 +12:00
parent 0a22812165
commit d1289b0de1
6 changed files with 62 additions and 41 deletions
+3 -2
View File
@@ -4,6 +4,7 @@ import javafx.scene.paint.Color;
import javafx.scene.shape.Arc;
import javafx.scene.shape.ArcType;
import javafx.scene.transform.Rotate;
import javafx.scene.transform.Translate;
/**
* Created by CJIRWIN on 27/04/2017.
@@ -22,13 +23,13 @@ class Wake extends Arc {
private int lifespan = MAX_LIFESPAN;
Wake (double startingX, double startingY, double velocityX, double velocityY, double rotation) {
super(startingX + 20, startingY + 30, 20, 30, 180, 0);
super(startingX, startingY, 20, 30, 180, 0);
//super.setFill(Color.BLUE);
super.setStroke(Color.DEEPSKYBLUE);
super.setType(ArcType.OPEN);
super.setFill(new Color(0, 0, 0 ,0));
super.setStrokeWidth(2.0);
super.getTransforms().add(new Rotate(rotation - 270, startingX + 20, startingY + 20));
super.getTransforms().add(new Rotate(rotation, 5, -15));
// this.velocityX = -velocityX;
// this.velocityY = -velocityY;
this.velocityX = 0;