mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-08-05 01:21:46 +02:00
added u-boat model
This commit is contained in:
@@ -36,6 +36,7 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
||||
private static final String UNSHADED = "Common/MatDefs/Misc/Unshaded.j3md"; //NON-NLS
|
||||
private static final String KING_GEORGE_V_MODEL = "Models/KingGeorgeV/KingGeorgeV.j3o";//NON-NLS
|
||||
private static final String SMALL_BOAT_MODEL = "Models/BoatSmall/12219_boat_v2_L2.j3o";
|
||||
private static final String UBOAT_MODEL = "Models/UBoat/14084_WWII_Ship_German_Type_II_U-boat_v2_L1.j30";
|
||||
private static final String COLOR = "Color"; //NON-NLS
|
||||
private static final String SHIP = "ship"; //NON-NLS
|
||||
private static final String SHOT = "shot"; //NON-NLS
|
||||
@@ -145,6 +146,8 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
||||
switch (ship.getLength()) {
|
||||
case 4:
|
||||
return createBattleship(ship);
|
||||
case 2:
|
||||
return createUBoat(ship);
|
||||
|
||||
case 1:
|
||||
return createSmallShip(ship);
|
||||
@@ -222,6 +225,16 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
||||
return model;
|
||||
}
|
||||
|
||||
private Spatial createUBoat(Battleship ship) {
|
||||
final Spatial model = app.getAssetManager().loadModel(UBOAT_MODEL);
|
||||
|
||||
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
|
||||
model.scale(1.48f);
|
||||
model.setShadowMode(ShadowMode.CastAndReceive);
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Calculates the rotation angle for the specified rotation.
|
||||
|
Reference in New Issue
Block a user