diff --git a/Projekte/battleship/client/src/main/java/pp/battleship/client/gui/SeaSynchronizer.java b/Projekte/battleship/client/src/main/java/pp/battleship/client/gui/SeaSynchronizer.java index cd56309..3cc62fc 100644 --- a/Projekte/battleship/client/src/main/java/pp/battleship/client/gui/SeaSynchronizer.java +++ b/Projekte/battleship/client/src/main/java/pp/battleship/client/gui/SeaSynchronizer.java @@ -77,7 +77,7 @@ class SeaSynchronizer extends ShipMapSynchronizer { */ @Override public Spatial visit(Shot shot) { - return shot.isHit() ? handleHit(shot) : createCylinder(shot); + return shot.isHit() ? handleHit(shot) : handleMiss(shot); } /** @@ -136,6 +136,18 @@ class SeaSynchronizer extends ShipMapSynchronizer { return null; } + private Spatial handleMiss(Shot shot) { + Node shotNode = new Node("ShotNode"); + Geometry shotCylinder = createCylinder(shot); + shotNode.attachChild(shotCylinder); + ParticleEmitter waterSplash = particleFactory.createWaterSplash(); + waterSplash.setLocalTranslation(shot.getY() + 0.5f, 0f, shot.getX() + 0.5f); + shotNode.attachChild(waterSplash); + waterSplash.emitAllParticles(); + + return shotNode; + } + /** * Creates a cylinder geometry representing the specified shot. diff --git a/Projekte/battleship/client/src/main/resources/Effects/Splash/splash.png b/Projekte/battleship/client/src/main/resources/Effects/Splash/splash.png new file mode 100644 index 0000000..62856bd Binary files /dev/null and b/Projekte/battleship/client/src/main/resources/Effects/Splash/splash.png differ