added boat with length 1 and 3
@@ -35,7 +35,10 @@ import static pp.util.FloatMath.PI;
|
||||
class SeaSynchronizer extends ShipMapSynchronizer {
|
||||
private static final String UNSHADED = "Common/MatDefs/Misc/Unshaded.j3md"; //NON-NLS
|
||||
|
||||
private static final String UX23 = "Models/UX23/UX23.j3o";
|
||||
|
||||
private static final String ALIENSHIP = "Models/Alienship/Alienship.j3o";
|
||||
private static final String MARLOW66 = "Models/Marlow66/Marlow66.j3o";
|
||||
private static final String KING_GEORGE_V_MODEL = "Models/KingGeorgeV/KingGeorgeV.j3o"; //NON-NLS
|
||||
private static final String COLOR = "Color"; //NON-NLS
|
||||
private static final String SHIP = "ship"; //NON-NLS
|
||||
@@ -144,6 +147,12 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
||||
*/
|
||||
private Spatial createShip(Battleship ship) {
|
||||
switch (ship.getLength()) {
|
||||
|
||||
case 1:
|
||||
return createUX23(ship);
|
||||
|
||||
case 3:
|
||||
return createMarlow66(ship);
|
||||
case 4:
|
||||
return createBattleship(ship);
|
||||
case 5:
|
||||
@@ -161,9 +170,32 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
||||
model.setShadowMode(ShadowMode.CastAndReceive);
|
||||
|
||||
return model;}
|
||||
private Spatial createUX23(Battleship ship) {
|
||||
final Spatial model = app.getAssetManager().loadModel(UX23);
|
||||
|
||||
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
|
||||
// model.move(0f, -0.05f, 0f);
|
||||
model.scale(0.0027f);
|
||||
model.setShadowMode(ShadowMode.CastAndReceive);
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
private Spatial createMarlow66(Battleship ship) {
|
||||
final Spatial model = app.getAssetManager().loadModel(MARLOW66);
|
||||
|
||||
model.rotate(0f, calculateRotationAngle(ship.getRot()), 0f);
|
||||
model.move(0f, 0.25f, 0f);
|
||||
model.scale(0.0085f);
|
||||
model.setShadowMode(ShadowMode.CastAndReceive);
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Creates a simple box to represent a battleship that is not of the "King George V" type.
|
||||
*
|
||||
* @param ship the battleship to be represented
|
||||
|
After Width: | Height: | Size: 235 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 127 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 3.1 MiB |
After Width: | Height: | Size: 3.2 MiB |