Compare commits
	
		
			5 Commits
		
	
	
		
			1db2d9ebac
			...
			1e20a2ac6e
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					1e20a2ac6e | ||
| 
						 | 
					36a9a7addf | ||
| 
						 | 
					e1190cd4a2 | ||
| 
						 | 
					34ecd2277b | ||
| 
						 | 
					5959f36a21 | 
@@ -8,24 +8,22 @@ import com.jme3.effect.ParticleMesh;
 | 
			
		||||
import com.jme3.effect.shapes.EmitterSphereShape;
 | 
			
		||||
import com.jme3.light.AmbientLight;
 | 
			
		||||
import com.jme3.light.DirectionalLight;
 | 
			
		||||
import com.jme3.light.PointLight;
 | 
			
		||||
import com.jme3.material.Material;
 | 
			
		||||
import com.jme3.material.RenderState.FaceCullMode;
 | 
			
		||||
import com.jme3.math.ColorRGBA;
 | 
			
		||||
import com.jme3.math.FastMath;
 | 
			
		||||
import com.jme3.math.Quaternion;
 | 
			
		||||
import com.jme3.math.Vector3f;
 | 
			
		||||
import com.jme3.renderer.Camera;
 | 
			
		||||
import com.jme3.renderer.queue.RenderQueue;
 | 
			
		||||
import com.jme3.renderer.queue.RenderQueue.ShadowMode;
 | 
			
		||||
import com.jme3.scene.Geometry;
 | 
			
		||||
import com.jme3.scene.Node;
 | 
			
		||||
import com.jme3.scene.Spatial;
 | 
			
		||||
import com.jme3.scene.shape.Box;
 | 
			
		||||
import com.jme3.scene.shape.Cylinder;
 | 
			
		||||
import com.jme3.scene.shape.Sphere;
 | 
			
		||||
import com.jme3.shadow.DirectionalLightShadowRenderer;
 | 
			
		||||
import com.jme3.shadow.EdgeFilteringMode;
 | 
			
		||||
import com.jme3.texture.Texture;
 | 
			
		||||
import com.jme3.util.SkyFactory;
 | 
			
		||||
import com.jme3.util.TangentBinormalGenerator;
 | 
			
		||||
 | 
			
		||||
import pp.monopoly.client.gui.BobTheBuilder;
 | 
			
		||||
@@ -33,13 +31,7 @@ import pp.monopoly.client.gui.CameraController;
 | 
			
		||||
import pp.monopoly.client.gui.CameraInputHandler;
 | 
			
		||||
import pp.monopoly.client.gui.Toolbar;
 | 
			
		||||
import pp.monopoly.model.Board;
 | 
			
		||||
import pp.monopoly.client.gui.FigureControl;
 | 
			
		||||
 | 
			
		||||
import static java.lang.Math.divideExact;
 | 
			
		||||
import static pp.util.FloatMath.TWO_PI;
 | 
			
		||||
import static pp.util.FloatMath.cos;
 | 
			
		||||
import static pp.util.FloatMath.sin;
 | 
			
		||||
import static pp.util.FloatMath.sqrt;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Manages the rendering and visual aspects of the sea and sky in the Battleship game.
 | 
			
		||||
@@ -75,15 +67,14 @@ public class BoardAppState extends MonopolyAppState {
 | 
			
		||||
    /**
 | 
			
		||||
     * The pop-up manager for displaying messages and notifications.
 | 
			
		||||
     */
 | 
			
		||||
    private PopUpManager popUpManager;;
 | 
			
		||||
    private PopUpManager popUpManager;
 | 
			
		||||
 | 
			
		||||
    private Vector3f currentTarget = new Vector3f(-10f,0,-10f);
 | 
			
		||||
    private Vector3f currentTarget;
 | 
			
		||||
 | 
			
		||||
    private float modelHeight = -5f;
 | 
			
		||||
    private final float targetHeight = 0f; 
 | 
			
		||||
    private final float animationSpeed = 0.01389f; 
 | 
			
		||||
   
 | 
			
		||||
    
 | 
			
		||||
    private Node modelNode;
 | 
			
		||||
    private boolean startAnimation = false; 
 | 
			
		||||
    
 | 
			
		||||
    private CameraController cameraController;
 | 
			
		||||
    private CameraInputHandler cameraInputHandler;
 | 
			
		||||
 | 
			
		||||
@@ -177,17 +168,79 @@ public class BoardAppState extends MonopolyAppState {
 | 
			
		||||
     */
 | 
			
		||||
    private void setupSky() {
 | 
			
		||||
        final AssetManager assetManager = getApp().getAssetManager();
 | 
			
		||||
        final Texture west = assetManager.loadTexture("Pictures/Backdrop/wall.jpg"); //NON-NLS
 | 
			
		||||
        final Texture east = assetManager.loadTexture("Pictures/Backdrop/door.jpg"); //NON-NLS
 | 
			
		||||
        final Texture north = assetManager.loadTexture("Pictures/Backdrop/board.jpg"); //NON-NLS
 | 
			
		||||
        final Texture south = assetManager.loadTexture("Pictures/Backdrop/wall.jpg"); //NON-NLS
 | 
			
		||||
        final Texture up = assetManager.loadTexture("Pictures/Backdrop/wall.jpg"); //NON-NLS
 | 
			
		||||
        final Texture down = assetManager.loadTexture("Pictures/Backdrop/floor1.jpg"); //NON-NLS
 | 
			
		||||
        final Spatial sky = SkyFactory.createSky(assetManager, west, east, north, south, up, down);
 | 
			
		||||
        // sky.rotate(0, PI, 0);
 | 
			
		||||
        viewNode.attachChild(sky);
 | 
			
		||||
 | 
			
		||||
        // Create a cylinder for the sky
 | 
			
		||||
        float radius = 500f; // Adjust radius as needed
 | 
			
		||||
        float height = 200f; // Height of the cylinder
 | 
			
		||||
        int radialSamples = 64; // Number of radial segments for smoothness
 | 
			
		||||
        int axisSamples = 2; // No vertical divisions (flat vertical surface)
 | 
			
		||||
        
 | 
			
		||||
        Cylinder skyCylinder = new Cylinder(axisSamples, radialSamples, radius, height, true);
 | 
			
		||||
 | 
			
		||||
        // Create a geometry for the cylinder
 | 
			
		||||
        Geometry skyGeometry = new Geometry("CylinderSky", skyCylinder);
 | 
			
		||||
 | 
			
		||||
        // Load the cylindrical texture
 | 
			
		||||
        Texture cylinderTexture = assetManager.loadTexture("Textures/CylinderMap.jpg");
 | 
			
		||||
 | 
			
		||||
        // Create a material and apply the texture
 | 
			
		||||
        Material skyMaterial = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
 | 
			
		||||
        skyMaterial.setTexture("ColorMap", cylinderTexture);
 | 
			
		||||
        skyMaterial.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off); // Render inside of the cylinder
 | 
			
		||||
 | 
			
		||||
        // Assign material to the geometry
 | 
			
		||||
        skyGeometry.setMaterial(skyMaterial);
 | 
			
		||||
        skyGeometry.rotate(-FastMath.HALF_PI, 0, 0); // Rotate 90° along the Y-axis
 | 
			
		||||
 | 
			
		||||
        // Position and attach the cylinder to the scene
 | 
			
		||||
        skyGeometry.setQueueBucket(RenderQueue.Bucket.Sky); // Ensure it's rendered in the background
 | 
			
		||||
        skyGeometry.setCullHint(Spatial.CullHint.Never); // Always render the sky
 | 
			
		||||
 | 
			
		||||
        viewNode.attachChild(skyGeometry);
 | 
			
		||||
 | 
			
		||||
        addCylinderCaps();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Adds top and bottom caps to the cylinder sky.
 | 
			
		||||
 */
 | 
			
		||||
private void addCylinderCaps() {
 | 
			
		||||
    final AssetManager assetManager = getApp().getAssetManager();
 | 
			
		||||
 | 
			
		||||
    float radius = 500f; // Match the cylinder's radius
 | 
			
		||||
    float height = 225f; // Match the cylinder's height
 | 
			
		||||
    int radialSamples = 64; // Match the cylinder's radial samples
 | 
			
		||||
 | 
			
		||||
    // Bottom Cap
 | 
			
		||||
    Cylinder bottomCap = new Cylinder(2, radialSamples, radius, 0.01f, true, false); // Thin bottom cap
 | 
			
		||||
    Geometry bottomGeometry = new Geometry("BottomCap", bottomCap);
 | 
			
		||||
    bottomGeometry.setLocalTranslation(0, -height / 2, 0); // Position at the bottom
 | 
			
		||||
    bottomGeometry.rotate(FastMath.HALF_PI, 0, 0); // Rotate to make it horizontal
 | 
			
		||||
    Material bottomMaterial = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
 | 
			
		||||
    bottomMaterial.setTexture("ColorMap", assetManager.loadTexture("Textures/grass.jpg")); // Bottom texture
 | 
			
		||||
    bottomMaterial.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off); // Render both sides
 | 
			
		||||
    bottomGeometry.setMaterial(bottomMaterial);
 | 
			
		||||
    bottomGeometry.setQueueBucket(RenderQueue.Bucket.Sky);
 | 
			
		||||
    bottomGeometry.setCullHint(Spatial.CullHint.Never);
 | 
			
		||||
 | 
			
		||||
    // Top Cap
 | 
			
		||||
    Cylinder topCap = new Cylinder(2, radialSamples, radius, 0.01f, true, false); // Thin top cap
 | 
			
		||||
    Geometry topGeometry = new Geometry("TopCap", topCap);
 | 
			
		||||
    topGeometry.setLocalTranslation(0, height / 2, 0); // Position at the top
 | 
			
		||||
    topGeometry.rotate(FastMath.HALF_PI, 0, 0); // Rotate to make it horizontal
 | 
			
		||||
    Material topMaterial = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
 | 
			
		||||
    topMaterial.setTexture("ColorMap", assetManager.loadTexture("Textures/Top.png")); // Top texture
 | 
			
		||||
    topMaterial.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off); // Render both sides
 | 
			
		||||
    topGeometry.setMaterial(topMaterial);
 | 
			
		||||
    topGeometry.setQueueBucket(RenderQueue.Bucket.Sky);
 | 
			
		||||
    topGeometry.setCullHint(Spatial.CullHint.Never);
 | 
			
		||||
 | 
			
		||||
    // Attach caps to the view node
 | 
			
		||||
    viewNode.attachChild(bottomGeometry);
 | 
			
		||||
    viewNode.attachChild(topGeometry);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Sets up the sea surface in the scene. This includes creating the sea mesh,
 | 
			
		||||
     * applying textures, and enabling shadows.
 | 
			
		||||
@@ -211,8 +264,6 @@ public class BoardAppState extends MonopolyAppState {
 | 
			
		||||
    
 | 
			
		||||
        sceneNode.attachChild(createCardDeck());
 | 
			
		||||
        sceneNode.attachChild(seaGeo);
 | 
			
		||||
 | 
			
		||||
        addModelToCenter(sceneNode);
 | 
			
		||||
    
 | 
			
		||||
        // Schneefall hinzufügen
 | 
			
		||||
        addSnowEffect(sceneNode);
 | 
			
		||||
@@ -220,22 +271,43 @@ public class BoardAppState extends MonopolyAppState {
 | 
			
		||||
 | 
			
		||||
    private Node createCardDeck() {
 | 
			
		||||
        Node cardDeck = new Node("cardDeck");
 | 
			
		||||
        Spatial card = getApp().getAssetManager().loadModel("models/Kartendecks/Ereigniskarten.j3o");
 | 
			
		||||
        card.setLocalTranslation(5.5f, 0, 2.7f);
 | 
			
		||||
        card.setLocalScale(4.1f);
 | 
			
		||||
        card.setLocalRotation(new Quaternion().fromAngleAxis(FastMath.QUARTER_PI, Vector3f.UNIT_Y));
 | 
			
		||||
 | 
			
		||||
        Spatial card2 = getApp().getAssetManager().loadModel("models/Kartendecks/Gemeinschaftskarten.j3o");
 | 
			
		||||
        card2.setLocalTranslation(-1.4f, 0, -3.8f);
 | 
			
		||||
        card2.setLocalScale(4.1f);
 | 
			
		||||
        card2.setLocalRotation(new Quaternion().fromAngleAxis(FastMath.QUARTER_PI , Vector3f.UNIT_Y));
 | 
			
		||||
 | 
			
		||||
        //TODO insert card deck
 | 
			
		||||
        // cardDeck.attachChild(card);
 | 
			
		||||
        // cardDeck.attachChild(card2);
 | 
			
		||||
    
 | 
			
		||||
        // Ereigniskarten
 | 
			
		||||
        Vector3f basePosition1 = new Vector3f(3.1f, 0.4f, 3.8f); // Basisposition für Ereigniskarten
 | 
			
		||||
        float baseRotation1 = -60; // Basisrotation in Grad
 | 
			
		||||
        for (int i = 0; i < 6; i++) {
 | 
			
		||||
            Box box = new Box(1.2f, 0.05f, 1.8f); // Sehr flaches Rechteck
 | 
			
		||||
            Geometry flatCard = new Geometry("Ereigniskarten_" + i, box);
 | 
			
		||||
            Material mat = new Material(getApp().getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
 | 
			
		||||
            mat.setTexture("ColorMap", getApp().getAssetManager().loadTexture("Textures/Ereigniskarten.png"));
 | 
			
		||||
            flatCard.setMaterial(mat);
 | 
			
		||||
    
 | 
			
		||||
            // Position und Rotation für die Karte
 | 
			
		||||
            flatCard.setLocalTranslation(basePosition1.x, basePosition1.y - (i * 0.08f), basePosition1.z);
 | 
			
		||||
            flatCard.setLocalRotation(new Quaternion().fromAngleAxis(FastMath.DEG_TO_RAD * (baseRotation1 - (i * 5)), Vector3f.UNIT_Y));
 | 
			
		||||
    
 | 
			
		||||
            cardDeck.attachChild(flatCard);
 | 
			
		||||
        }
 | 
			
		||||
    
 | 
			
		||||
        // Gemeinschaftskarten
 | 
			
		||||
        Vector3f basePosition2 = new Vector3f(-3.3f, 0.4f, -3.8f); // Basisposition für Gemeinschaftskarten
 | 
			
		||||
        float baseRotation2 = -220; // Basisrotation in Grad
 | 
			
		||||
        for (int i = 0; i < 6; i++) {
 | 
			
		||||
            Box box = new Box(1.2f, 0.04f, 1.8f); // Sehr flaches Rechteck
 | 
			
		||||
            Geometry flatCard = new Geometry("Gemeinschaftskarten_" + i, box);
 | 
			
		||||
            Material mat = new Material(getApp().getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
 | 
			
		||||
            mat.setTexture("ColorMap", getApp().getAssetManager().loadTexture("Textures/Gemeinschaftskarten.png"));
 | 
			
		||||
            flatCard.setMaterial(mat);
 | 
			
		||||
    
 | 
			
		||||
            // Position und Rotation für die Karte
 | 
			
		||||
            flatCard.setLocalTranslation(basePosition2.x, basePosition2.y - (i * 0.08f), basePosition2.z);
 | 
			
		||||
            flatCard.setLocalRotation(new Quaternion().fromAngleAxis(FastMath.DEG_TO_RAD * (baseRotation2 - (i * 5)), Vector3f.UNIT_Y));
 | 
			
		||||
    
 | 
			
		||||
            cardDeck.attachChild(flatCard);
 | 
			
		||||
        }
 | 
			
		||||
    
 | 
			
		||||
        return cardDeck;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Vector3f getCurrentTarget(){
 | 
			
		||||
        return currentTarget;
 | 
			
		||||
    }
 | 
			
		||||
@@ -269,86 +341,4 @@ public class BoardAppState extends MonopolyAppState {
 | 
			
		||||
        parentNode.attachChild(snowEmitter);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private void addModelToCenter(Node parentNode) {
 | 
			
		||||
        AssetManager assetManager = getApp().getAssetManager();
 | 
			
		||||
    
 | 
			
		||||
        Material material = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
 | 
			
		||||
        material.setColor("Diffuse", ColorRGBA.White);
 | 
			
		||||
        material.setBoolean("UseMaterialColors", true);
 | 
			
		||||
    
 | 
			
		||||
        Sphere lowerSphereLeft = new Sphere(32, 32, 0.5f);
 | 
			
		||||
        Geometry lowerSphereLeftGeom = new Geometry("LowerSphereLeft", lowerSphereLeft);
 | 
			
		||||
        lowerSphereLeftGeom.setMaterial(material);
 | 
			
		||||
        lowerSphereLeftGeom.setLocalTranslation(-0.6f - 4f, 0.5f, 0.3f - 5f);
 | 
			
		||||
 | 
			
		||||
        Sphere lowerSphereRight = new Sphere(32, 32, 0.5f);
 | 
			
		||||
        Geometry lowerSphereRightGeom = new Geometry("LowerSphereRight", lowerSphereRight);
 | 
			
		||||
        lowerSphereRightGeom.setMaterial(material);
 | 
			
		||||
        lowerSphereRightGeom.setLocalTranslation(0.6f - 4f, 0.5f, 0.3f - 5f);
 | 
			
		||||
 | 
			
		||||
        Cylinder cylinder = new Cylinder(16, 16, 0.4f, 2f, true);
 | 
			
		||||
        Geometry cylinderGeom = new Geometry("Cylinder", cylinder);
 | 
			
		||||
        cylinderGeom.setMaterial(material);
 | 
			
		||||
        cylinderGeom.setLocalTranslation(0f - 4f, 1.5f, 0f - 5f);
 | 
			
		||||
        cylinderGeom.rotate(FastMath.HALF_PI, 0, 0);
 | 
			
		||||
 | 
			
		||||
        Sphere upperSphere = new Sphere(32, 32, 0.4f);
 | 
			
		||||
        Geometry upperSphereGeom = new Geometry("UpperSphere", upperSphere);
 | 
			
		||||
        upperSphereGeom.setMaterial(material);
 | 
			
		||||
        upperSphereGeom.setLocalTranslation(0f - 4f, 2.5f, 0f - 5f);
 | 
			
		||||
 | 
			
		||||
        this.modelNode = new Node("3DModel");
 | 
			
		||||
        this.modelNode.attachChild(lowerSphereLeftGeom);
 | 
			
		||||
        this.modelNode.attachChild(lowerSphereRightGeom);
 | 
			
		||||
        this.modelNode.attachChild(cylinderGeom);
 | 
			
		||||
        this.modelNode.attachChild(upperSphereGeom);
 | 
			
		||||
 | 
			
		||||
        this.modelNode.setLocalTranslation(0, modelHeight, 0);
 | 
			
		||||
        parentNode.attachChild(this.modelNode);
 | 
			
		||||
 | 
			
		||||
        PointLight lightLeft = new PointLight();
 | 
			
		||||
        lightLeft.setColor(ColorRGBA.Blue);
 | 
			
		||||
        lightLeft.setPosition(new Vector3f(-0.6f - 4f, 0f, 0.3f - 5f));
 | 
			
		||||
        lightLeft.setRadius(2f);
 | 
			
		||||
        parentNode.addLight(lightLeft);
 | 
			
		||||
 | 
			
		||||
        PointLight lightRight = new PointLight();
 | 
			
		||||
        lightRight.setColor(ColorRGBA.Blue);
 | 
			
		||||
        lightRight.setPosition(new Vector3f(0.6f - 4f, 0f, 0.3f - 5f));
 | 
			
		||||
        lightRight.setRadius(2f);
 | 
			
		||||
        parentNode.addLight(lightRight);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    @Override
 | 
			
		||||
    public void update(float tpf) {
 | 
			
		||||
        super.update(tpf);
 | 
			
		||||
        if (startAnimation && modelHeight < targetHeight) {
 | 
			
		||||
            modelHeight += animationSpeed * tpf; // Geschwindigkeit basierend auf Zeit pro Frame
 | 
			
		||||
            if (modelHeight > targetHeight) {
 | 
			
		||||
                modelHeight = targetHeight; // Zielhöhe nicht überschreiten
 | 
			
		||||
                startAnimation = false; // Animation beenden
 | 
			
		||||
            }
 | 
			
		||||
            updateModelHeight(); // Aktualisiere die Position des Modells
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    private void updateModelHeight() {
 | 
			
		||||
        if (modelNode == null) {
 | 
			
		||||
            modelNode = (Node) sceneNode.getChild("3DModel");
 | 
			
		||||
        }
 | 
			
		||||
        if (modelNode != null) {
 | 
			
		||||
            modelNode.setLocalTranslation(0, modelHeight, 0); // Aktualisiere die Y-Position
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void onRollDicePressed() {
 | 
			
		||||
        System.out.println("onRollDicePressed called");
 | 
			
		||||
        if (!startAnimation) {
 | 
			
		||||
            startAnimation = true;
 | 
			
		||||
            modelHeight = -5f; // Reset der Höhe
 | 
			
		||||
            updateModelHeight(); // Stelle sicher, dass das Modell an der Startposition ist
 | 
			
		||||
            System.out.println("Animation started, startAnimation set to: " + startAnimation);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -293,6 +293,8 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga
 | 
			
		||||
            stateManager.attach(stats);
 | 
			
		||||
        }
 | 
			
		||||
        flyCam.setEnabled(true);
 | 
			
		||||
        flyCam.setMoveSpeed(4f); // Setzt die Bewegungsgeschwindigkeit der Kamera (Standardwert ist 1f)
 | 
			
		||||
 | 
			
		||||
        stateManager.detach(stateManager.getState(StatsAppState.class));
 | 
			
		||||
        stateManager.detach(stateManager.getState(DebugKeysAppState.class));
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -20,7 +20,6 @@ import com.simsilica.lemur.event.MouseEventControl;
 | 
			
		||||
import com.simsilica.lemur.event.MouseListener;
 | 
			
		||||
import com.simsilica.lemur.style.ElementId;
 | 
			
		||||
import pp.dialog.Dialog;
 | 
			
		||||
import pp.monopoly.client.BoardAppState;
 | 
			
		||||
import pp.monopoly.client.MonopolyApp;
 | 
			
		||||
import pp.monopoly.client.gui.popups.Bankrupt;
 | 
			
		||||
import pp.monopoly.game.server.Player;
 | 
			
		||||
@@ -197,16 +196,6 @@ public class Toolbar extends Dialog implements GameEventListener {
 | 
			
		||||
        menuContainer.setBackground(null);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns the color of the current player.
 | 
			
		||||
     *
 | 
			
		||||
     * @return The color of the current player.
 | 
			
		||||
     */
 | 
			
		||||
    private ColorRGBA getCurrentPlayerColor() {
 | 
			
		||||
        Player currentPlayer = playerHandler.getPlayerById(app.getId());
 | 
			
		||||
        return Player.getColor(currentPlayer.getId()).getColor();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Creates the dice display section of the toolbar interface.
 | 
			
		||||
     *
 | 
			
		||||
@@ -291,12 +280,6 @@ public class Toolbar extends Dialog implements GameEventListener {
 | 
			
		||||
        startDiceAnimation();
 | 
			
		||||
        app.getGameLogic().send(new RollDice());
 | 
			
		||||
        app.getGameLogic().playSound(Sound.BUTTON);
 | 
			
		||||
 | 
			
		||||
        // Animation in BoardAppState starten
 | 
			
		||||
        BoardAppState boardAppState = app.getStateManager().getState(BoardAppState.class);
 | 
			
		||||
        if (boardAppState != null) {
 | 
			
		||||
            boardAppState.onRollDicePressed(); // Animation starten
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -361,18 +344,6 @@ public class Toolbar extends Dialog implements GameEventListener {
 | 
			
		||||
        return endTurnButton;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Creates a background with the specified color.
 | 
			
		||||
     *
 | 
			
		||||
     * @param color The color of the background.
 | 
			
		||||
     * @return The background component.
 | 
			
		||||
     */
 | 
			
		||||
    private QuadBackgroundComponent createButtonBackground(ColorRGBA color) {
 | 
			
		||||
        QuadBackgroundComponent background = new QuadBackgroundComponent(color);
 | 
			
		||||
        Texture gradient = app.getAssetManager().loadTexture("Textures/gradient.png");
 | 
			
		||||
        if (gradient != null) background.setTexture(gradient);
 | 
			
		||||
        return background;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Handles the end turn event.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								Projekte/monopoly/client/src/main/resources/Textures/Bot.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 707 KiB  | 
| 
		 After Width: | Height: | Size: 14 MiB  | 
| 
		 After Width: | Height: | Size: 215 KiB  | 
| 
		 After Width: | Height: | Size: 60 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Projekte/monopoly/client/src/main/resources/Textures/Top.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 478 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Projekte/monopoly/client/src/main/resources/Textures/grass.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 3.2 MiB  | 
| 
		 After Width: | Height: | Size: 215 KiB  | 
| 
		 After Width: | Height: | Size: 60 KiB  |