Skip to content

Commit

Permalink
Add sound for falling fields
Browse files Browse the repository at this point in the history
  • Loading branch information
lscgh committed Feb 7, 2024
1 parent 14fb193 commit 39a03ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mavenmcserver/src/main/java/mavenmcserver/game/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public class Game {
public static Sound LOSE_SOUND = Sound.ENTITY_WITHER_HURT;
public static Sound TIE_SOUND = Sound.BLOCK_NOTE_BLOCK_COW_BELL;
public static float TIE_SOUND_PITCH = 0.5f;
public static Sound FIELD_FALL_SOUND = Sound.BLOCK_STONE_PLACE;
public static float FIELD_FALL_SOUND_PITCH = 0.5f;

/// Contains all queued games that still have to be accepted / rejected
public static HashMap<UUID, Game> queuedGames = new HashMap<UUID, Game>();
Expand Down Expand Up @@ -90,6 +92,7 @@ public void run() {

if(didApplyAnyChange) {
state.applyVisually(location);
playGameSound(Game.FIELD_FALL_SOUND, Game.FIELD_FALL_SOUND_PITCH);
}

if(!didApplyAnyChange && !didCompletePlace) {
Expand Down
2 changes: 2 additions & 0 deletions mavenmcserver/src/main/resources/classes.uml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class FieldPoint {
+{static}Sound LOSE_SOUND
+{static}Sound TIE_SOUND
+{static}float TIE_SOUND_PITCH
+{static}Sound FIELD_FALL_SOUND
+{static}float FIELD_FALL_SOUND_PITCH
+{static}HashMap<UUID, Game> queuedGames
+{static}HashMap<Player, Game> runningGames
+{static}HashMap<Player, GameConfig> lostGames
Expand Down

0 comments on commit 39a03ed

Please sign in to comment.