mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-18 22:56:15 +01:00
added control for figures
This commit is contained in:
parent
10a5b6b4d4
commit
645433610f
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user