mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-08-06 13:40:15 +02:00
Added boat model for 3x1 boats
This commit is contained in:
@@ -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 |
Binary file not shown.
Reference in New Issue
Block a user