mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-08-06 08:55:51 +02:00
demo
This commit is contained in:
@@ -43,6 +43,7 @@ public class BoardAppState extends MonopolyAppState {
|
||||
* The path to the unshaded texture material.
|
||||
*/
|
||||
private static final String UNSHADED = "Common/MatDefs/Misc/Unshaded.j3md"; //NON-NLS
|
||||
private static final String LIGHTING = "Common/MatDefs/Light/Lighting.j3md";
|
||||
|
||||
/**
|
||||
* The path to the sea texture material.
|
||||
@@ -95,7 +96,8 @@ public class BoardAppState extends MonopolyAppState {
|
||||
viewNode.attachChild(sceneNode);
|
||||
|
||||
setupLights();
|
||||
setupSky();
|
||||
// setupSky();
|
||||
getApp().getViewPort().setBackgroundColor(new com.jme3.math.ColorRGBA(0.5f, 0.7f, 1.0f, 1.0f));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -153,7 +155,8 @@ public class BoardAppState extends MonopolyAppState {
|
||||
viewNode.addLight(sun);
|
||||
shRend.setLight(sun);
|
||||
|
||||
final AmbientLight ambientLight = new AmbientLight(new ColorRGBA(1f, 1f, 1f, 1f));
|
||||
final AmbientLight ambientLight = new AmbientLight();
|
||||
// ambientLight.setColor(ColorRGBA.White.mult(0.f)); // brightness
|
||||
viewNode.addLight(ambientLight);
|
||||
}
|
||||
|
||||
@@ -252,7 +255,16 @@ public class BoardAppState extends MonopolyAppState {
|
||||
seaGeo.setLocalRotation(rotation);
|
||||
final Material seaMat = new Material(getApp().getAssetManager(), "Common/MatDefs/Light/Lighting.j3md");
|
||||
Texture texture = getApp().getAssetManager().loadTexture("Pictures/board2.png");
|
||||
texture.setMagFilter(Texture.MagFilter.Bilinear);
|
||||
texture.setMinFilter(Texture.MinFilter.Trilinear);
|
||||
seaMat.setTexture("DiffuseMap", texture);
|
||||
|
||||
// Add specular highlights
|
||||
// seaMat.setBoolean("UseMaterialColors", true);
|
||||
seaMat.setColor("Diffuse", ColorRGBA.White);
|
||||
seaMat.setColor("Specular", ColorRGBA.White);
|
||||
// seaMat.setFloat("Shininess", 16f);
|
||||
|
||||
seaGeo.setMaterial(seaMat);
|
||||
seaGeo.setShadowMode(ShadowMode.CastAndReceive);
|
||||
TangentBinormalGenerator.generate(seaGeo);
|
||||
@@ -273,7 +285,7 @@ public class BoardAppState extends MonopolyAppState {
|
||||
for (int i = 0; i < 6; i++) {
|
||||
Box box = new Box(1.2f, 0.05f, 1.8f); // Sehr flaches Rechteck
|
||||
Geometry flatCard = new Geometry("Ereigniskarten_" + i, box);
|
||||
Material mat = new Material(getApp().getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
|
||||
Material mat = new Material(getApp().getAssetManager(), UNSHADED);
|
||||
mat.setTexture("ColorMap", getApp().getAssetManager().loadTexture("Textures/Ereigniskarten.png"));
|
||||
flatCard.setMaterial(mat);
|
||||
|
||||
|
@@ -56,7 +56,7 @@ public class PopUpManager implements GameEventListener {
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 6000);
|
||||
}, 8000);
|
||||
} else if (event.msg().equals("Winner")) {
|
||||
new WinnerPopUp(app).open();
|
||||
} else if (event.msg().equals("Looser")) {
|
||||
|
@@ -89,13 +89,13 @@ public class CameraController implements GameEventListener{
|
||||
int fieldId = playerHandler.getPlayerById( (currentMode == CameraMode.FOCUS_SELF ? app.getId() : playerHandler.getPlayerAtIndex(0).getId()) ).getFieldID();
|
||||
// System.out.println();
|
||||
if(fieldId < 10) {
|
||||
offset = new Vector3f(0, 15, -20);
|
||||
offset = new Vector3f(0, 10, -15);
|
||||
} else if(fieldId < 20) {
|
||||
offset = new Vector3f(20 , 15, 0);
|
||||
offset = new Vector3f(15 , 10, 0);
|
||||
} else if(fieldId < 30) {
|
||||
offset = new Vector3f(0, 15, 20 );
|
||||
offset = new Vector3f(0, 10, 15 );
|
||||
} else {
|
||||
offset = new Vector3f(-20, 15, 0);
|
||||
offset = new Vector3f(-15, 10, 0);
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
@@ -76,11 +76,11 @@ public class GateFieldCard extends Dialog implements PopupDialog {
|
||||
propertyValuesContainer.addChild(new Label("„Preis: " + field.getPrice() + " EUR", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))); // Empty line
|
||||
propertyValuesContainer.addChild(new Label("Miete: 250 EUR", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("Wenn man 2 Bahnhöfe", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("Wenn man 2 Tore", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("besitzt: 500 EUR", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("Wenn man 3 Bahnhöfe", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("Wenn man 3 Tore", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("besitzt: 1000 EUR", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("Wenn man 4 Bahnhöfe", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("Wenn man 4 Tore", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("besitzt: 2000 EUR", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))); // Empty line
|
||||
propertyValuesContainer.addChild(new Label("„Hypothek: " + field.getHypo() + " EUR", new ElementId("label-Text")));
|
||||
|
Reference in New Issue
Block a user