Skip to content

Commit

Permalink
added engineer death sound, changed weapon sound
Browse files Browse the repository at this point in the history
  • Loading branch information
The-AhmadAA committed Oct 18, 2023
1 parent 3c69248 commit b3aa5a7
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 7 deletions.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -188,6 +190,7 @@ void animateDeath() {
} else {
animator.startAnimation(DEATH_ANIM);
}
deathSound.play();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit b3aa5a7

Please sign in to comment.