mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Fixed parrot again.
This commit is contained in:
@@ -13,7 +13,7 @@ public enum BoatMeshType {
|
||||
PIRATE_SHIP("pirateship_hull.stl", "pirateship_mast.stl", -0.5415, "pirateship_mainsail.stl",
|
||||
-0.5415, "pirateship_frontsail.stl", true, 1.2, 1.6, 1.2),
|
||||
DUCKY("ducky_hull.stl", "ducky_mast.stl", -2.18539, "ducky_sail.stl", -2.18539, "ducky_eyes.stl", false, 1.2, 1.1, 1.4),
|
||||
PARROT("parrot_hull.stl", null, 0, "parrot_sail.stl", 0, "parrot_features.stl", true, 1, 1, 1),
|
||||
PARROT("parrot_hull.stl", null, 0, "parrot_features.stl", 0, "parrot_sail.stl", true, 1, 1, 1),
|
||||
WAKA("waka_hull.stl", "waka_mast.stl", 0, "waka_sail.stl", 0, null, true, 1.7, 0.5, 1.5);
|
||||
|
||||
final String hullFile, mastFile, sailFile, jibFile;
|
||||
|
||||
@@ -100,19 +100,19 @@ public class ModelFactory {
|
||||
mast.setMaterial(new PhongMaterial(primaryColour));
|
||||
boatAssets.getChildren().add(mast);
|
||||
} else {
|
||||
boatAssets.getChildren().add(new Group());
|
||||
boatAssets.getChildren().add(new MeshView());
|
||||
}
|
||||
|
||||
MeshView sail = importBoatSTL(boatType.sailFile);
|
||||
sail.setMaterial(
|
||||
new PhongMaterial(boatType == BoatMeshType.PARROT ? Color.DARKGRAY : Color.WHITE)
|
||||
new PhongMaterial(boatType == BoatMeshType.PARROT ? Color.BLACK : Color.WHITE)
|
||||
);
|
||||
boatAssets.getChildren().add(sail);
|
||||
|
||||
if (boatType.jibFile != null) {
|
||||
MeshView jib = importBoatSTL(boatType.jibFile);
|
||||
jib.setMaterial(
|
||||
new PhongMaterial(boatType == BoatMeshType.PARROT ? Color.BLACK : Color.WHITE)
|
||||
new PhongMaterial(boatType == BoatMeshType.PARROT ? Color.DARKGRAY : Color.WHITE)
|
||||
);
|
||||
boatAssets.getChildren().add(jib);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package seng302.utilities;
|
||||
|
||||
/**
|
||||
* Created by cir27 on 28/09/17.
|
||||
*/
|
||||
public class MapMakerTest {
|
||||
// @Test
|
||||
|
||||
}
|
||||
@@ -16,26 +16,26 @@ public class CustomMapsSteps {
|
||||
|
||||
@Given("^that the game has multiple race xml files$")
|
||||
public void that_the_game_has_multiple_race_xml_files() throws Throwable {
|
||||
// mapMaker = MapMaker.getInstance();
|
||||
// String firstMap = mapMaker.getCurrentRacePath();
|
||||
// int numMaps = 0;
|
||||
// do {
|
||||
// mapMaker.next();
|
||||
// numMaps++;
|
||||
// } while (!mapMaker.getCurrentRacePath().equals(firstMap));
|
||||
// Assert.assertTrue(numMaps >= 2);
|
||||
mapMaker = MapMaker.getInstance();
|
||||
String firstMap = mapMaker.getCurrentRacePath();
|
||||
int numMaps = 0;
|
||||
do {
|
||||
mapMaker.next();
|
||||
numMaps++;
|
||||
} while (!mapMaker.getCurrentRacePath().equals(firstMap));
|
||||
Assert.assertTrue(numMaps >= 2);
|
||||
}
|
||||
|
||||
@Then("^all of them can be seen$")
|
||||
public void all_of_them_can_be_seen() throws Throwable {
|
||||
// File[] files = new File(this.getClass().getResource("/maps/").getPath()).listFiles();
|
||||
// for (File file : files) {
|
||||
// if (file.isFile()) {
|
||||
// Assert.assertTrue(file.getAbsolutePath().equals(mapMaker.getCurrentRacePath()));
|
||||
// mapMaker.next();
|
||||
// System.out.println(file.getAbsolutePath());
|
||||
// }
|
||||
// }
|
||||
File[] files = new File(this.getClass().getResource("/maps/").getPath()).listFiles();
|
||||
for (File file : files) {
|
||||
if (file.isFile()) {
|
||||
Assert.assertTrue(file.getAbsolutePath().equals(mapMaker.getCurrentRacePath()));
|
||||
mapMaker.next();
|
||||
System.out.println(file.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Given("^that I choose a race$")
|
||||
|
||||
Reference in New Issue
Block a user