Skip to content

Commit

Permalink
Walk sfx matches with animation
Browse files Browse the repository at this point in the history
  • Loading branch information
nrebei2 committed May 22, 2023
1 parent 9d519f1 commit f4aed45
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/src/infinityx/lunarhaze/controllers/PlayerState.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,20 @@ public void update(PlayerController entity) {
frame = entity.player.animation.getCurFrame();
// match sound with frames
if (entity.player.isWerewolf()) {
if (frame == 2 || frame == 5) {
entity.walk_sound.play();
}
} else {
if (direction == Direction.DOWN) {
// special case
if (frame == 0 || frame == 4) {
entity.walk_sound.play();
}
} else {
if (frame == 0 || frame == 2) {
if (frame == 2 || frame == 5) {
entity.walk_sound.play();
}
}
} else {
if (frame == 0 || frame == 2) {
entity.walk_sound.play();
}
}
}

Expand Down

0 comments on commit f4aed45

Please sign in to comment.