mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +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",
|
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),
|
-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),
|
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);
|
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;
|
final String hullFile, mastFile, sailFile, jibFile;
|
||||||
|
|||||||
@@ -100,19 +100,19 @@ public class ModelFactory {
|
|||||||
mast.setMaterial(new PhongMaterial(primaryColour));
|
mast.setMaterial(new PhongMaterial(primaryColour));
|
||||||
boatAssets.getChildren().add(mast);
|
boatAssets.getChildren().add(mast);
|
||||||
} else {
|
} else {
|
||||||
boatAssets.getChildren().add(new Group());
|
boatAssets.getChildren().add(new MeshView());
|
||||||
}
|
}
|
||||||
|
|
||||||
MeshView sail = importBoatSTL(boatType.sailFile);
|
MeshView sail = importBoatSTL(boatType.sailFile);
|
||||||
sail.setMaterial(
|
sail.setMaterial(
|
||||||
new PhongMaterial(boatType == BoatMeshType.PARROT ? Color.DARKGRAY : Color.WHITE)
|
new PhongMaterial(boatType == BoatMeshType.PARROT ? Color.BLACK : Color.WHITE)
|
||||||
);
|
);
|
||||||
boatAssets.getChildren().add(sail);
|
boatAssets.getChildren().add(sail);
|
||||||
|
|
||||||
if (boatType.jibFile != null) {
|
if (boatType.jibFile != null) {
|
||||||
MeshView jib = importBoatSTL(boatType.jibFile);
|
MeshView jib = importBoatSTL(boatType.jibFile);
|
||||||
jib.setMaterial(
|
jib.setMaterial(
|
||||||
new PhongMaterial(boatType == BoatMeshType.PARROT ? Color.BLACK : Color.WHITE)
|
new PhongMaterial(boatType == BoatMeshType.PARROT ? Color.DARKGRAY : Color.WHITE)
|
||||||
);
|
);
|
||||||
boatAssets.getChildren().add(jib);
|
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$")
|
@Given("^that the game has multiple race xml files$")
|
||||||
public void that_the_game_has_multiple_race_xml_files() throws Throwable {
|
public void that_the_game_has_multiple_race_xml_files() throws Throwable {
|
||||||
// mapMaker = MapMaker.getInstance();
|
mapMaker = MapMaker.getInstance();
|
||||||
// String firstMap = mapMaker.getCurrentRacePath();
|
String firstMap = mapMaker.getCurrentRacePath();
|
||||||
// int numMaps = 0;
|
int numMaps = 0;
|
||||||
// do {
|
do {
|
||||||
// mapMaker.next();
|
mapMaker.next();
|
||||||
// numMaps++;
|
numMaps++;
|
||||||
// } while (!mapMaker.getCurrentRacePath().equals(firstMap));
|
} while (!mapMaker.getCurrentRacePath().equals(firstMap));
|
||||||
// Assert.assertTrue(numMaps >= 2);
|
Assert.assertTrue(numMaps >= 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Then("^all of them can be seen$")
|
@Then("^all of them can be seen$")
|
||||||
public void all_of_them_can_be_seen() throws Throwable {
|
public void all_of_them_can_be_seen() throws Throwable {
|
||||||
// File[] files = new File(this.getClass().getResource("/maps/").getPath()).listFiles();
|
File[] files = new File(this.getClass().getResource("/maps/").getPath()).listFiles();
|
||||||
// for (File file : files) {
|
for (File file : files) {
|
||||||
// if (file.isFile()) {
|
if (file.isFile()) {
|
||||||
// Assert.assertTrue(file.getAbsolutePath().equals(mapMaker.getCurrentRacePath()));
|
Assert.assertTrue(file.getAbsolutePath().equals(mapMaker.getCurrentRacePath()));
|
||||||
// mapMaker.next();
|
mapMaker.next();
|
||||||
// System.out.println(file.getAbsolutePath());
|
System.out.println(file.getAbsolutePath());
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Given("^that I choose a race$")
|
@Given("^that I choose a race$")
|
||||||
|
|||||||
Reference in New Issue
Block a user