diff --git a/source/core/assets/sounds/engineers/DesignedGunshot_Pistol1.ogg b/source/core/assets/sounds/engineers/DesignedGunshot_Pistol1.ogg new file mode 100644 index 000000000..1d95f6ca9 Binary files /dev/null and b/source/core/assets/sounds/engineers/DesignedGunshot_Pistol1.ogg differ diff --git a/source/core/assets/sounds/engineers/HumanInjured2.ogg b/source/core/assets/sounds/engineers/HumanInjured2.ogg new file mode 100644 index 000000000..0c02b6daf Binary files /dev/null and b/source/core/assets/sounds/engineers/HumanInjured2.ogg differ diff --git a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java index dcd6d346f..c818c6254 100644 --- a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java +++ b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java @@ -176,8 +176,9 @@ public class ForestGameArea extends GameArea { "sounds/towers/gun_shot_trimmed.mp3", "sounds/towers/deploy.mp3", "sounds/towers/stow.mp3", + "sounds/engineers/DesignedGunshot_Pistol1.ogg", + "sounds/engineers/HumanInjured2.ogg", "sounds/engineers/firing_auto.mp3", - "sounds/engineers/firing_single.mp3", "sounds/projectiles/on_collision.mp3", "sounds/projectiles/explosion.mp3", "sounds/waves/wave-start/Wave_Start_Alarm.ogg", diff --git a/source/core/src/main/com/csse3200/game/components/player/HumanAnimationController.java b/source/core/src/main/com/csse3200/game/components/player/HumanAnimationController.java index 5317c6b4b..92fbe2684 100644 --- a/source/core/src/main/com/csse3200/game/components/player/HumanAnimationController.java +++ b/source/core/src/main/com/csse3200/game/components/player/HumanAnimationController.java @@ -45,13 +45,15 @@ public class HumanAnimationController extends Component { // Sound effects constants private static final String FIRE_AUTO_SFX = "sounds/engineers/firing_auto.mp3"; - private static final String FIRE_SINGLE_SFX = "sounds/engineers/firing_single.mp3"; + private static final String FIRE_SINGLE_SFX = "sounds/engineers/DesignedGunshot_Pistol1.ogg"; + private static final String DEATH_SFX = "sounds/engineers/HumanInjured2.ogg"; private AnimationRenderComponent animator; private final Sound fireAutoSound = ServiceLocator.getResourceService().getAsset( FIRE_AUTO_SFX, Sound.class); private final Sound fireSingleSound = ServiceLocator.getResourceService().getAsset( FIRE_SINGLE_SFX, Sound.class); + private final Sound deathSound = ServiceLocator.getResourceService().getAsset(DEATH_SFX, Sound.class); private boolean clicked = false; @@ -188,6 +190,7 @@ void animateDeath() { } else { animator.startAnimation(DEATH_ANIM); } + deathSound.play(); } /** diff --git a/source/core/src/main/com/csse3200/game/screens/AssetLoader.java b/source/core/src/main/com/csse3200/game/screens/AssetLoader.java index d224c8e78..039a55965 100644 --- a/source/core/src/main/com/csse3200/game/screens/AssetLoader.java +++ b/source/core/src/main/com/csse3200/game/screens/AssetLoader.java @@ -149,8 +149,9 @@ public class AssetLoader { "sounds/towers/gun_shot_trimmed.mp3", "sounds/towers/deploy.mp3", "sounds/towers/stow.mp3", + "sounds/engineers/DesignedGunshot_Pistol1.ogg", "sounds/engineers/firing_auto.mp3", - "sounds/engineers/firing_single.mp3", + "sounds/engineers/HumanInjured2.ogg", "sounds/projectiles/on_collision.mp3", "sounds/projectiles/explosion.mp3", "sounds/waves/wave-start/Wave_Start_Alarm.ogg", diff --git a/source/core/src/test/com/csse3200/game/components/player/HumanAnimationControllerTest.java b/source/core/src/test/com/csse3200/game/components/player/HumanAnimationControllerTest.java index 1647cd9ef..63759a0bc 100644 --- a/source/core/src/test/com/csse3200/game/components/player/HumanAnimationControllerTest.java +++ b/source/core/src/test/com/csse3200/game/components/player/HumanAnimationControllerTest.java @@ -24,7 +24,8 @@ class HumanAnimationControllerTest { private final String[] atlas = {"images/engineers/engineer.atlas"}; private static final String[] sounds = { "sounds/engineers/firing_auto.mp3", - "sounds/engineers/firing_single.mp3" + "sounds/engineers/DesignedGunshot_Pistol1.ogg", + "sounds/engineers/HumanInjured2.ogg" }; private final String[] animations = { diff --git a/source/core/src/test/com/csse3200/game/components/tasks/EngineerCombatTaskTest.java b/source/core/src/test/com/csse3200/game/components/tasks/EngineerCombatTaskTest.java index 70236cac5..812d5a67c 100644 --- a/source/core/src/test/com/csse3200/game/components/tasks/EngineerCombatTaskTest.java +++ b/source/core/src/test/com/csse3200/game/components/tasks/EngineerCombatTaskTest.java @@ -34,7 +34,8 @@ class EngineerCombatTaskTest { private final String[] projectileAtlas = {"images/projectiles/engineer_projectile.atlas"}; private static final String[] sounds = { "sounds/engineers/firing_auto.mp3", - "sounds/engineers/firing_single.mp3" + "sounds/engineers/DesignedGunshot_Pistol1.ogg", + "sounds/engineers/HumanInjured2.ogg" }; private final String[] animations = { diff --git a/source/core/src/test/com/csse3200/game/components/tasks/human/HumanWanderTaskTest.java b/source/core/src/test/com/csse3200/game/components/tasks/human/HumanWanderTaskTest.java index a44eb69e1..4bf5e33d1 100644 --- a/source/core/src/test/com/csse3200/game/components/tasks/human/HumanWanderTaskTest.java +++ b/source/core/src/test/com/csse3200/game/components/tasks/human/HumanWanderTaskTest.java @@ -34,7 +34,9 @@ class HumanWanderTaskTest { private final String[] atlas = {"images/engineers/engineer.atlas"}; private static final String[] sounds = { "sounds/engineers/firing_auto.mp3", - "sounds/engineers/firing_single.mp3" + "sounds/engineers/DesignedGunshot_Pistol1.ogg", + "sounds/engineers/HumanInjured2.ogg" + }; @BeforeEach diff --git a/source/core/src/test/com/csse3200/game/entities/factories/EngineerFactoryTest.java b/source/core/src/test/com/csse3200/game/entities/factories/EngineerFactoryTest.java index 1a54a0685..3e4874311 100644 --- a/source/core/src/test/com/csse3200/game/entities/factories/EngineerFactoryTest.java +++ b/source/core/src/test/com/csse3200/game/entities/factories/EngineerFactoryTest.java @@ -32,7 +32,8 @@ class EngineerFactoryTest { private final String[] atlas = {"images/engineers/engineer.atlas"}; private static final String[] sounds = { "sounds/engineers/firing_auto.mp3", - "sounds/engineers/firing_single.mp3" + "sounds/engineers/DesignedGunshot_Pistol1.ogg", + "sounds/engineers/HumanInjured2.ogg" }; private final String[] animations = {