mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-19 03:46:15 +01:00
added cards and changed camera
This commit is contained in:
parent
2eae0fce2a
commit
723c934d73
@ -95,7 +95,7 @@ public class BoardAppState extends MonopolyAppState {
|
|||||||
sceneNode.detachAllChildren();
|
sceneNode.detachAllChildren();
|
||||||
setupScene();
|
setupScene();
|
||||||
if (bobTheBuilder == null) {
|
if (bobTheBuilder == null) {
|
||||||
bobTheBuilder = new BobTheBuilder(getApp(), getApp().getRootNode());
|
bobTheBuilder = new BobTheBuilder(getApp(), sceneNode);
|
||||||
System.out.println("LISTENER IS REGISTEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD");
|
System.out.println("LISTENER IS REGISTEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD");
|
||||||
getGameLogic().addListener(bobTheBuilder);
|
getGameLogic().addListener(bobTheBuilder);
|
||||||
}
|
}
|
||||||
@ -120,7 +120,7 @@ public class BoardAppState extends MonopolyAppState {
|
|||||||
final float x = mx - cos;
|
final float x = mx - cos;
|
||||||
final float y = my - sin;
|
final float y = my - sin;
|
||||||
final Camera camera = getApp().getCamera();
|
final Camera camera = getApp().getCamera();
|
||||||
camera.setLocation(new Vector3f(x, ABOVE_SEA_LEVEL, y));
|
camera.setLocation(new Vector3f(0,40,0));
|
||||||
camera.lookAt(new Vector3f(0,0, 0),
|
camera.lookAt(new Vector3f(0,0, 0),
|
||||||
Vector3f.UNIT_Y);
|
Vector3f.UNIT_Y);
|
||||||
camera.update();
|
camera.update();
|
||||||
@ -210,6 +210,24 @@ public class BoardAppState extends MonopolyAppState {
|
|||||||
seaGeo.setMaterial(seaMat);
|
seaGeo.setMaterial(seaMat);
|
||||||
seaGeo.setShadowMode(ShadowMode.CastAndReceive);
|
seaGeo.setShadowMode(ShadowMode.CastAndReceive);
|
||||||
TangentBinormalGenerator.generate(seaGeo);
|
TangentBinormalGenerator.generate(seaGeo);
|
||||||
|
sceneNode.attachChild(createCardDeck());
|
||||||
sceneNode.attachChild(seaGeo);
|
sceneNode.attachChild(seaGeo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Node createCardDeck() {
|
||||||
|
Node cardDeck = new Node("cardDeck");
|
||||||
|
Spatial card = getApp().getAssetManager().loadModel("models/Kartendecks/Ereigniskarten_Deck.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_Deck.j3o");
|
||||||
|
card2.setLocalTranslation(-1.4f, 0, -3.8f);
|
||||||
|
card2.setLocalScale(4.1f);
|
||||||
|
card2.setLocalRotation(new Quaternion().fromAngleAxis(FastMath.QUARTER_PI , Vector3f.UNIT_Y));
|
||||||
|
|
||||||
|
cardDeck.attachChild(card);
|
||||||
|
cardDeck.attachChild(card2);
|
||||||
|
return cardDeck;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user