added control for figures

This commit is contained in:
Johannes Schmelz 2024-12-08 02:43:58 +01:00
parent 10a5b6b4d4
commit 645433610f
2 changed files with 29 additions and 1 deletions

View File

@ -43,7 +43,7 @@ public class BobTheBuilder extends GameBoardSynchronizer {
// Setze die Rotation basierend auf der Feld-ID // Setze die Rotation basierend auf der Feld-ID
node.setLocalRotation(figure.getRot().toQuaternion()); node.setLocalRotation(figure.getRot().toQuaternion());
// node.addControl(new FigureControl(figure)); node.addControl(new FigureControl(figure));
return node; return node;
} }

View File

@ -0,0 +1,28 @@
package pp.monopoly.client.gui;
import com.jme3.renderer.RenderManager;
import com.jme3.renderer.ViewPort;
import com.jme3.scene.control.AbstractControl;
import pp.monopoly.model.Figure;
public class FigureControl extends AbstractControl {
private final Figure figure;
public FigureControl(Figure figure) {
super();
this.figure = figure;
}
@Override
protected void controlUpdate(float tpf) {
//TODO: animation
}
@Override
protected void controlRender(RenderManager rm, ViewPort vp) {
// No rendering required
}
}