Add bonus sounds
This commit is contained in:
		@@ -178,7 +178,12 @@ private void handleGame(Notification notification) {
 | 
			
		||||
            boardHandler.unshieldPiece(n.getPieceUuid());
 | 
			
		||||
        } else if (notification instanceof PlayCardNotification n) {
 | 
			
		||||
            if(n.getCard() == BonusCard.TURBO) {
 | 
			
		||||
                app.getAcousticHandler().playSound(MdgaSound.TURBO);
 | 
			
		||||
                guiHandler.turbo();
 | 
			
		||||
            } else if(n.getCard() == BonusCard.SHIELD) {
 | 
			
		||||
                app.getAcousticHandler().playSound(MdgaSound.SHIELD);
 | 
			
		||||
            } else if(n.getCard() == BonusCard.SWAP) {
 | 
			
		||||
                app.getAcousticHandler().playSound(MdgaSound.SWAP);
 | 
			
		||||
            }
 | 
			
		||||
            if(n.getColor() == ownColor) guiHandler.playCardOwn(n.getCard());
 | 
			
		||||
            else guiHandler.playCardEnemy(n.getColor(), n.getCard());
 | 
			
		||||
 
 | 
			
		||||
@@ -147,6 +147,15 @@ public void playSound(MdgaSound sound) {
 | 
			
		||||
            case TANK_EXPLOSION:
 | 
			
		||||
                assets.add(new SoundAssetDelayVolume(SoundAsset.EXPLOSION_1, 1.0f, 0f));
 | 
			
		||||
                break;
 | 
			
		||||
            case SHIELD:
 | 
			
		||||
                assets.add(new SoundAssetDelayVolume(SoundAsset.SHIELD, 1.0f, 0f));
 | 
			
		||||
                break;
 | 
			
		||||
            case TURBO:
 | 
			
		||||
                assets.add(new SoundAssetDelayVolume(SoundAsset.SPEED, 1.0f, 0f));
 | 
			
		||||
                break;
 | 
			
		||||
            case SWAP:
 | 
			
		||||
                assets.add(new SoundAssetDelayVolume(SoundAsset.SWAP, 1.0f, 0f));
 | 
			
		||||
                break;
 | 
			
		||||
            default:
 | 
			
		||||
                break;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -40,5 +40,8 @@ public enum MdgaSound {
 | 
			
		||||
    MATRIX,
 | 
			
		||||
    TURRET_ROTATE,
 | 
			
		||||
    TANK_SHOOT,
 | 
			
		||||
    TANK_EXPLOSION
 | 
			
		||||
    TANK_EXPLOSION,
 | 
			
		||||
    SHIELD,
 | 
			
		||||
    TURBO,
 | 
			
		||||
    SWAP,
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -39,7 +39,10 @@ enum SoundAsset {
 | 
			
		||||
    MATRIX("matrix.wav"),
 | 
			
		||||
    CONNECTED("connected.wav"),
 | 
			
		||||
    TURRET_ROTATE("turret_rotate.ogg"),
 | 
			
		||||
    TANK_SHOOT("tank_shoot.ogg")
 | 
			
		||||
    TANK_SHOOT("tank_shoot.ogg"),
 | 
			
		||||
    SHIELD("shield.ogg"),
 | 
			
		||||
    SPEED("speed.ogg"),
 | 
			
		||||
    SWAP("swap.ogg"),
 | 
			
		||||
    ;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								Projekte/mdga/client/src/main/resources/Sounds/shield.ogg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Projekte/mdga/client/src/main/resources/Sounds/shield.ogg
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Projekte/mdga/client/src/main/resources/Sounds/speed.ogg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Projekte/mdga/client/src/main/resources/Sounds/speed.ogg
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Projekte/mdga/client/src/main/resources/Sounds/swap.ogg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Projekte/mdga/client/src/main/resources/Sounds/swap.ogg
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user