Boats use their assigned color.
Boat name is displayed in lobby instead of source ID.
This commit is contained in:
@@ -15,6 +15,7 @@ import javafx.scene.control.Label;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.paint.PhongMaterial;
|
||||
import javafx.scene.shape.MeshView;
|
||||
import mock.app.Event;
|
||||
import network.Messages.Enums.RaceStatusEnum;
|
||||
@@ -144,6 +145,8 @@ public class InGameLobbyController extends Controller {
|
||||
subjects.add(sea);
|
||||
|
||||
MeshView mesh = new MeshView(importer.getImport());
|
||||
PhongMaterial boatColorMat = new PhongMaterial(boat.getColor());
|
||||
mesh.setMaterial(boatColorMat);
|
||||
Subject3D subject = new Subject3D(mesh,0);
|
||||
subjects.add(subject);
|
||||
|
||||
@@ -161,7 +164,7 @@ public class InGameLobbyController extends Controller {
|
||||
};
|
||||
rotate.start();
|
||||
|
||||
allPlayerLabels.get(count).setText("Player: " + boat.getSourceID());
|
||||
allPlayerLabels.get(count).setText(boat.getName());
|
||||
allPlayerLabels.get(count).toFront();
|
||||
count += 1;
|
||||
if (count > 2){
|
||||
|
||||
@@ -305,6 +305,8 @@ public class RaceViewController extends Controller {
|
||||
} else {
|
||||
mesh = new MeshView(importerBurgerBoat.getImport());
|
||||
}
|
||||
PhongMaterial boatColorMat = new PhongMaterial(boat.getColor());
|
||||
mesh.setMaterial(boatColorMat);
|
||||
Subject3D boatModel = new Subject3D(mesh, boat.getSourceID());
|
||||
|
||||
viewSubjects.add(boatModel);
|
||||
|
||||
Reference in New Issue
Block a user