Merge branch 'development2' of https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-01 into development2
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,16 @@ 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, 0.1f));
 | 
			
		||||
                assets.add(new SoundAssetDelayVolume(SoundAsset.SPEED, 1.0f, 1.3f));
 | 
			
		||||
                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.
										
									
								
							@@ -84,7 +84,7 @@ public void received(RequestMoveMessage msg, int from){
 | 
			
		||||
 | 
			
		||||
            if(targetNode.isBonus()) {
 | 
			
		||||
                for (Player p : logic.getGame().getPlayersAsList()) {
 | 
			
		||||
                    if(p.isActive()) {
 | 
			
		||||
                    if(p.getColor() == logic.getGame().getActiveColor()) {
 | 
			
		||||
                        logic.getServerSender().send(logic.getGame().getPlayerIdByColor(p.getColor()), new DrawCardMessage(logic.getGame().draw()));
 | 
			
		||||
                    } else {
 | 
			
		||||
                        logic.getServerSender().send(logic.getGame().getPlayerIdByColor(p.getColor()), new DrawCardMessage(new HiddenCard()));
 | 
			
		||||
 
 | 
			
		||||
@@ -48,7 +48,7 @@ public void received(RequestMoveMessage msg, int from){
 | 
			
		||||
 | 
			
		||||
            if(targetNode.isBonus()) {
 | 
			
		||||
                for (Player p : logic.getGame().getPlayersAsList()) {
 | 
			
		||||
                    if(p.isActive()) {
 | 
			
		||||
                    if(p.getColor() == logic.getGame().getActiveColor()) {
 | 
			
		||||
                        logic.getServerSender().send(logic.getGame().getPlayerIdByColor(p.getColor()), new DrawCardMessage(logic.getGame().draw()));
 | 
			
		||||
                    } else {
 | 
			
		||||
                        logic.getServerSender().send(logic.getGame().getPlayerIdByColor(p.getColor()), new DrawCardMessage(new HiddenCard()));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user