mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-08-06 01:55:32 +02:00
Added boat model for 2x1 boats
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_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 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 createMediumship(ship);
|
||||
|
||||
case 1:
|
||||
return createSmallship(ship);
|
||||
@@ -217,6 +220,17 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
||||
return model;
|
||||
}
|
||||
|
||||
private Spatial createMediumship(Battleship ship) {
|
||||
final Spatial model = app.getAssetManager().loadModel(U_BOAT_MODEL);
|
||||
|
||||
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
|
||||
model.scale(0.27f);
|
||||
model.setShadowMode(ShadowMode.CastAndReceive);
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Calculates the rotation angle for the specified rotation.
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 168 KiB |
Binary file not shown.
Reference in New Issue
Block a user