Added sound to rocket firing

This commit is contained in:
Fleischer Hanno hanno.fleischer@unibw.de
2024-10-13 08:58:48 +02:00
parent 487305dccc
commit 9e591e37c3
3 changed files with 21 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ public class AnimatonState extends ClientState {
public AnimatonState(ClientGameLogic logic, boolean myTurn, IntPoint position) {
super(logic);
logic.playMusic(Music.BATTLE_THEME);
logic.playSound(Sound.ROCKET_FIRED);
this.myTurn = myTurn;
if(myTurn) {
logic.getOpponentMap().add(new Shell(position));

View File

@@ -22,5 +22,9 @@ public enum Sound {
/**
* Sound of a ship being destroyed.
*/
DESTROYED_SHIP
DESTROYED_SHIP,
/**
* Sound of a rocket
*/
ROCKET_FIRED
}