Skip to content

Commit

Permalink
Documentation diagrams and code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
The-AhmadAA committed Sep 10, 2023
1 parent 68df594 commit a4ca46f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public class HumanAnimationController extends Component {
private static final String FIRE_AUTO_SFX = "sounds/engineers/firing_auto.mp3";
private static final String FIRE_SINGLE_SFX = "sounds/engineers/firing_single.mp3";

AnimationRenderComponent animator;
Sound fireAutoSound = ServiceLocator.getResourceService().getAsset(
private AnimationRenderComponent animator;
private final Sound fireAutoSound = ServiceLocator.getResourceService().getAsset(
FIRE_AUTO_SFX, Sound.class);
Sound fireSingleSound = ServiceLocator.getResourceService().getAsset(
private final Sound fireSingleSound = ServiceLocator.getResourceService().getAsset(
FIRE_SINGLE_SFX, Sound.class);

/**
Expand All @@ -56,7 +56,7 @@ public void create() {
entity.getEvents().addListener(PREP, this::animatePrep);
entity.getEvents().addListener(WALK_PREP, this::animatePrepWalk);
entity.getEvents().addListener(FIRING_SINGLE, this::animateSingleFiring);
entity.getEvents().addListener(FIRING_AUTO, this::animateFiring);
entity.getEvents().addListener(FIRING_AUTO, this::animateFiringAuto);
entity.getEvents().addListener(HIT, this::animateHit);
entity.getEvents().addListener(DEATH, this::animateDeath);
}
Expand Down Expand Up @@ -110,7 +110,7 @@ void animateSingleFiring() {
* Callback that starts the shoot animation in auto mode and plays the auto fire sound.
* Currently unused, but intended to be incorporated as engineer functionality expands.
*/
void animateFiring() {
void animateFiringAuto() {
animator.startAnimation(FIRE_AUTO_ANIM);
fireAutoSound.play();
}
Expand Down
Binary file added source/wiki/team-2/EngineerFactory UML.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a4ca46f

Please sign in to comment.