diff --git a/bin/de/bricked/resources/sounds/multiplicator.wav b/bin/de/bricked/resources/sounds/multiplicator.wav new file mode 100644 index 0000000000000000000000000000000000000000..86a1c1a54a42e59b41de1e51a7b83c9d89df1cf4 Binary files /dev/null and b/bin/de/bricked/resources/sounds/multiplicator.wav differ diff --git a/bin/de/bricked/resources/sounds/powerup_activated.wav b/bin/de/bricked/resources/sounds/powerup_activated.wav new file mode 100644 index 0000000000000000000000000000000000000000..35e98b551039350e91aac39fa241e879cdabb5a8 Binary files /dev/null and b/bin/de/bricked/resources/sounds/powerup_activated.wav differ diff --git a/src/de/bricked/game/Game.java b/src/de/bricked/game/Game.java index 70be5b0257aef876cc49343938462da2224593cb..69c6adb97078bdff6a31640329bceb2cd1925a35 100644 --- a/src/de/bricked/game/Game.java +++ b/src/de/bricked/game/Game.java @@ -9,6 +9,7 @@ import de.bricked.game.levels.LevelPack; import de.bricked.game.powerups.PowerUp; import de.bricked.game.settings.Settings; import de.bricked.game.sound.SoundHandler; +import de.bricked.game.sound.SoundType; import de.bricked.ui.LevelController; import javafx.geometry.Point2D; import logger.LogLevel; @@ -159,6 +160,7 @@ public class Game { totalPoints += pointsSinceLastMultiplicatorReset * multiplicator; Logger.log(LogLevel.DEBUG, "Applied multiplicator: " + pointsSinceLastMultiplicatorReset + " x" + multiplicator + " = " + totalPoints); + soundHandler.play(SoundType.MULTIPLICATOR); } } diff --git a/src/de/bricked/game/sound/SoundType.java b/src/de/bricked/game/sound/SoundType.java index 191d459747e628d8af9c7dbe62c87760e01f4762..53fdcbd9b29eacc19580a49d075d044c48671b6e 100644 --- a/src/de/bricked/game/sound/SoundType.java +++ b/src/de/bricked/game/sound/SoundType.java @@ -10,7 +10,9 @@ public enum SoundType LIFE_LOST("life_lost"), GAME_OVER("game_over"), FINISHED_LEVEL("finished_level"), - UNLOCKED("unlocked"); + UNLOCKED("unlocked"), + POWERUP_ACTIVATED("powerup_activated"), + MULTIPLICATOR("multiplicator"); private String fileName; diff --git a/src/de/bricked/resources/sounds/multiplicator.wav b/src/de/bricked/resources/sounds/multiplicator.wav new file mode 100644 index 0000000000000000000000000000000000000000..86a1c1a54a42e59b41de1e51a7b83c9d89df1cf4 Binary files /dev/null and b/src/de/bricked/resources/sounds/multiplicator.wav differ diff --git a/src/de/bricked/resources/sounds/powerup_activated.wav b/src/de/bricked/resources/sounds/powerup_activated.wav new file mode 100644 index 0000000000000000000000000000000000000000..35e98b551039350e91aac39fa241e879cdabb5a8 Binary files /dev/null and b/src/de/bricked/resources/sounds/powerup_activated.wav differ diff --git a/src/de/bricked/ui/LevelController.java b/src/de/bricked/ui/LevelController.java index 347effdd69a0c09337becea6364222f6212b6fbe..1de268171e52c3823766ff81e937cc1e4363d8db 100644 --- a/src/de/bricked/ui/LevelController.java +++ b/src/de/bricked/ui/LevelController.java @@ -917,7 +917,9 @@ public class LevelController HitLocation hitLocation = game.collides(labelPosition, paddlePosition, paddle.getWidth(), paddle.getHeight(), true); if(hitLocation != null && (hitLocation.equals(HitLocation.PADDLE) || hitLocation.equals(HitLocation.CORNER))) { - Logger.log(LogLevel.DEBUG, "Collected PowerUp with ID = " + currentPowerUp.getID()); + Logger.log(LogLevel.DEBUG, "Collected PowerUp with ID = " + currentPowerUp.getID()); + game.getSoundHandler().play(SoundType.POWERUP_ACTIVATED); + if(!currentPowerUp.isPermanent()) { addTimedPowerUp(currentPowerUp);