This commit is contained in:
Johannes Schmelz 2024-11-18 05:51:31 +01:00
parent 0e580a3180
commit b135f3fa50
3 changed files with 10 additions and 6 deletions

View File

@ -7,7 +7,6 @@
package pp.monopoly.client.gui; package pp.monopoly.client.gui;
import com.jme3.effect.ParticleEmitter;
import com.jme3.material.Material; import com.jme3.material.Material;
import com.jme3.material.RenderState.BlendMode; import com.jme3.material.RenderState.BlendMode;
import com.jme3.math.ColorRGBA; import com.jme3.math.ColorRGBA;
@ -16,18 +15,13 @@ import com.jme3.scene.Geometry;
import com.jme3.scene.Node; import com.jme3.scene.Node;
import com.jme3.scene.Spatial; import com.jme3.scene.Spatial;
import com.jme3.scene.shape.Box; import com.jme3.scene.shape.Box;
import com.jme3.scene.shape.Cylinder;
import groovyjarjarantlr4.v4.parse.ANTLRParser.finallyClause_return;
import pp.monopoly.client.MonopolyApp; import pp.monopoly.client.MonopolyApp;
import pp.monopoly.game.server.PlayerColor; import pp.monopoly.game.server.PlayerColor;
import pp.monopoly.model.Board; import pp.monopoly.model.Board;
import pp.monopoly.model.Figure; import pp.monopoly.model.Figure;
import pp.monopoly.model.Item;
import pp.monopoly.model.Rotation; import pp.monopoly.model.Rotation;
import static java.util.Objects.requireNonNull;
import static pp.util.FloatMath.HALF_PI; import static pp.util.FloatMath.HALF_PI;
import static pp.util.FloatMath.PI; import static pp.util.FloatMath.PI;

View File

@ -1,5 +1,9 @@
package pp.monopoly.client.gui; package pp.monopoly.client.gui;
import com.jme3.scene.Spatial;
import pp.monopoly.model.Figure;
/** /**
* Synchronizes the visual representation of the board with the game model. * Synchronizes the visual representation of the board with the game model.
* Handles updates for items on the board. * Handles updates for items on the board.
@ -33,4 +37,9 @@ class MapViewSynchronizer extends BoardSynchronizer {
protected void disableState() { protected void disableState() {
view.getNode().detachAllChildren(); // Entfernt alle visuellen Elemente vom Knoten view.getNode().detachAllChildren(); // Entfernt alle visuellen Elemente vom Knoten
} }
@Override
public Spatial visit(Figure figure) {
return figure.accept(this);
}
} }

View File

@ -57,6 +57,7 @@ public class Board {
this.width = width; this.width = width;
this.height = height; this.height = height;
this.eventBroker = eventBroker; this.eventBroker = eventBroker;
addItem(new Figure(5, 5, 5, Rotation.LEFT));
} }
/** /**