added JavaDocs
corrected typos
This commit is contained in:
		@@ -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
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user