diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/BoardAppState.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/BoardAppState.java index 8fd4701..f930b96 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/BoardAppState.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/BoardAppState.java @@ -67,7 +67,7 @@ public class BoardAppState extends MonopolyAppState { */ private PopUpManager popUpManager;; - private Vector3f currentTarget = new Vector3f(-10f,0,-10f); + private Vector3f currentTarget = new Vector3f(0f,0,0f); /** * Initializes the state by setting up the sky, lights, and other visual components. @@ -123,7 +123,7 @@ public class BoardAppState extends MonopolyAppState { final float x = mx - cos; final float y = my - sin; final Camera camera = getApp().getCamera(); - camera.setLocation(new Vector3f(0,30,0)); + camera.setLocation(new Vector3f(30,20,0)); camera.lookAt(new Vector3f(getCurrentTarget()), Vector3f.UNIT_Y); camera.update(); diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/BobTheBuilder.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/BobTheBuilder.java index 520af10..d9ec9ef 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/BobTheBuilder.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/BobTheBuilder.java @@ -44,7 +44,7 @@ public class BobTheBuilder extends GameBoardSynchronizer { // Setze die Rotation basierend auf der Feld-ID node.setLocalRotation(figure.getRot().toQuaternion()); - node.addControl(new FigureControl(spatial, figure, app)); + node.addControl(new FigureControl(node, figure, app)); return node; } diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/FigureControl.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/FigureControl.java index 0c22485..e1663f3 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/FigureControl.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/FigureControl.java @@ -5,6 +5,7 @@ import com.jme3.math.Quaternion; import com.jme3.math.Vector3f; import com.jme3.renderer.RenderManager; import com.jme3.renderer.ViewPort; +import com.jme3.scene.Node; import com.jme3.scene.Spatial; import com.jme3.scene.control.AbstractControl; @@ -19,7 +20,7 @@ import java.util.Queue; public class FigureControl extends AbstractControl implements GameEventListener { private final Figure figure; - private final Spatial spatial; + private final Node spatial; private final MonopolyApp app; private Queue path; // Path to follow private Vector3f currentTarget; @@ -29,7 +30,7 @@ public class FigureControl extends AbstractControl implements GameEventListener private float delayElapsed = 0f; // Zeit, die seit dem Start der Verzögerung vergangen ist - public FigureControl(Spatial spatial, Figure figure, MonopolyApp app) { + public FigureControl(Node spatial, Figure figure, MonopolyApp app) { super(); this.figure = figure; this.spatial = spatial; @@ -82,11 +83,11 @@ public class FigureControl extends AbstractControl implements GameEventListener -// Beispiel: Berechnung des nächsten Feldes -private int nextField() { - int currentField = figure.getCurrentFieldID(); - return (currentField + 1) % 40; // Weiter zum nächsten Feld -} + // Beispiel: Berechnung des nächsten Feldes + private int nextField() { + int currentField = figure.getCurrentFieldID(); + return (currentField + 1) % 40; // Weiter zum nächsten Feld + }