From 22bcd5502411889c717b9c4a0688dfbd029085a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Brennf=C3=B6rder?= Date: Fri, 4 Oct 2024 18:05:26 +0200 Subject: [PATCH] added JavaDocs corrected typos --- .../java/pp/battleship/client/BackgroundMusic.java | 6 +++--- .../java/pp/battleship/client/gui/SeaSynchronizer.java | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Projekte/battleship/client/src/main/java/pp/battleship/client/BackgroundMusic.java b/Projekte/battleship/client/src/main/java/pp/battleship/client/BackgroundMusic.java index 7a5ef4ac..5961dd03 100644 --- a/Projekte/battleship/client/src/main/java/pp/battleship/client/BackgroundMusic.java +++ b/Projekte/battleship/client/src/main/java/pp/battleship/client/BackgroundMusic.java @@ -38,7 +38,7 @@ public BackgroundMusic(Application app, String musicFilePath) { } /** - * Plays the music if the music is Stopped or paused + * starts the music */ public void play() { if (musicEnabled && (backgroundMusic.getStatus() == Status.Stopped || backgroundMusic.getStatus() == Status.Paused)) { @@ -47,7 +47,7 @@ public void play() { } /** - * Stops the music if it is playing + * Stops the music */ public void stop(){ if (backgroundMusic.getStatus() == Status.Playing) { @@ -82,7 +82,7 @@ public void setVolume(float volume) { } /** - * This method retuns the volume + * This method returns the volume * * @return the current volume as a float */ diff --git a/Projekte/battleship/client/src/main/java/pp/battleship/client/gui/SeaSynchronizer.java b/Projekte/battleship/client/src/main/java/pp/battleship/client/gui/SeaSynchronizer.java index d23ac511..05a60aa5 100644 --- a/Projekte/battleship/client/src/main/java/pp/battleship/client/gui/SeaSynchronizer.java +++ b/Projekte/battleship/client/src/main/java/pp/battleship/client/gui/SeaSynchronizer.java @@ -37,7 +37,7 @@ class SeaSynchronizer extends ShipMapSynchronizer { private static final String KING_GEORGE_V_MODEL = "Models/KingGeorgeV/KingGeorgeV.j3o"; private static final String UBOAT_MODEL = "Models/UBOAT/14084_WWII_Ship_German_Type_II_U-boat_v2_L1.obj"; private static final String PATROL_BOAT_MODEL = "Models/PATROL_BOAT/12219_boat_v2_L2.obj"; - private static final String BATTLESHIPV2_MODEL = "Models/BATTLESHIP/10619_Battleship.obj"; + private static final String MODERNBATTLESHIP_MODEL = "Models/BATTLESHIP/10619_Battleship.obj"; 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,7 +146,7 @@ public Spatial visit(Battleship ship) { private Spatial createShip(Battleship ship) { return switch (ship.getLength()){ case 1 -> createPatrolBoat(ship); - case 2 -> createBattleshipV2(ship); + case 2 -> createModernBattleship(ship); case 3 -> createUboat(ship); case 4 -> createBattleship(ship); default -> createBox(ship); @@ -206,14 +206,14 @@ private Spatial createBattleship(Battleship ship) { } /** - * Creates a detailed 3D model to represent a battleship. + * Creates a detailed 3D model to represent a modern battleship. * * @param ship the battleship to be represented * @return the spatial representing the battleship */ - private Spatial createBattleshipV2(Battleship ship) { - final Spatial model = app.getAssetManager().loadModel(BATTLESHIPV2_MODEL); + private Spatial createModernBattleship(Battleship ship) { + final Spatial model = app.getAssetManager().loadModel(MODERNBATTLESHIP_MODEL); model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()) + HALF_PI, 0f); model.scale(0.000075f);