mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Refactored Boat class to better fit the MVC model by moving all GUI parts to BoatPolygon. Changed the way animation works so that it will work with a constantly updated set of lats and lons.
TODO - Change Mark class to no longer store XY pixel data. TODO - Add in a timer force updates boat position if a packet has not been recieved for a while. #story30b #story30c #implement #refactor
This commit is contained in:
@@ -2,10 +2,7 @@ package seng302.controllers;
|
||||
|
||||
import javafx.animation.Animation;
|
||||
import javafx.animation.KeyFrame;
|
||||
import javafx.animation.KeyValue;
|
||||
import javafx.animation.Timeline;
|
||||
import javafx.beans.property.DoubleProperty;
|
||||
import javafx.beans.property.SimpleDoubleProperty;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.fxml.FXML;
|
||||
@@ -65,15 +62,15 @@ public class RaceViewController {
|
||||
// }
|
||||
|
||||
includedCanvasController.setup(this);
|
||||
includedCanvasController.setUpBoats();
|
||||
initializeTimer();
|
||||
includedCanvasController.initializeCanvas();
|
||||
//initializeTimer();
|
||||
initializeSettings();
|
||||
|
||||
//set wind direction!!!!!!! can't find another place to put my code --haoming
|
||||
double windDirection = new ConfigParser("/config/config.xml").getWindDirection();
|
||||
windDirectionText.setText(String.format("%.1f°", windDirection));
|
||||
windArrowText.setRotate(windDirection);
|
||||
|
||||
includedCanvasController.timer.start();
|
||||
}
|
||||
|
||||
private void initializeSettings(){
|
||||
|
||||
Reference in New Issue
Block a user