Added boat model for 3x1 boats

This commit is contained in:
Simon Wilkening
2024-10-12 21:35:55 +02:00
parent c339f3fc9d
commit dc52cf4f32
13 changed files with 407286 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ class SeaSynchronizer extends ShipMapSynchronizer {
private static final String KING_GEORGE_V_MODEL = "Models/KingGeorgeV/KingGeorgeV.j3o"; //NON-NLS
private static final String SMALL_SHIP_MODEL = "Models/SmallShip/SmallShip.j3o"; //NON-NLS
private static final String U_BOAT_MODEL = "Models/WWII_ship_German_Type_II_U-boat_v2/WW2Uboat.j3o"; //NON-NLS
private static final String TUG_BOAT_MODEL = "Models/TugBoat/TugBoat.j3o"; //NON-NLS
private static final String COLOR = "Color"; //NON-NLS
private static final String SHIP = "ship"; //NON-NLS
private static final String SHOT = "shot"; //NON-NLS
@@ -146,6 +147,10 @@ class SeaSynchronizer extends ShipMapSynchronizer {
switch (ship.getLength()) {
case 4:
return createBattleship(ship);
case 3:
return createLargeship(ship);
case 2:
return createMediumship(ship);
@@ -230,6 +235,16 @@ class SeaSynchronizer extends ShipMapSynchronizer {
return model;
}
private Spatial createLargeship(Battleship ship) {
final Spatial model = app.getAssetManager().loadModel(TUG_BOAT_MODEL);
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
model.scale(0.0004f);
model.setShadowMode(ShadowMode.CastAndReceive);
return model;
}
/**

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB