mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-18 18:23:44 +01:00
Merge remote-tracking branch 'origin/gui' into gui
This commit is contained in:
commit
1969afc58f
@ -72,7 +72,7 @@ public class BoardAppState extends MonopolyAppState {
|
|||||||
*/
|
*/
|
||||||
private PopUpManager popUpManager;;
|
private PopUpManager popUpManager;;
|
||||||
|
|
||||||
private Vector3f currentTarget = new Vector3f(0f,0,0f);
|
private Vector3f currentTarget = new Vector3f(-10f,0,-10f);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the state by setting up the sky, lights, and other visual components.
|
* Initializes the state by setting up the sky, lights, and other visual components.
|
||||||
@ -86,6 +86,10 @@ public class BoardAppState extends MonopolyAppState {
|
|||||||
super.initialize(stateManager, application);
|
super.initialize(stateManager, application);
|
||||||
popUpManager = new PopUpManager(getApp());
|
popUpManager = new PopUpManager(getApp());
|
||||||
viewNode.attachChild(sceneNode);
|
viewNode.attachChild(sceneNode);
|
||||||
|
|
||||||
|
//TODO remove this only for camera testing
|
||||||
|
adjustCamera();
|
||||||
|
|
||||||
setupLights();
|
setupLights();
|
||||||
setupSky();
|
setupSky();
|
||||||
}
|
}
|
||||||
@ -129,7 +133,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(30,20,0));
|
camera.setLocation(new Vector3f(0,10,0));
|
||||||
camera.lookAt(new Vector3f(getCurrentTarget()),
|
camera.lookAt(new Vector3f(getCurrentTarget()),
|
||||||
Vector3f.UNIT_Y);
|
Vector3f.UNIT_Y);
|
||||||
camera.update();
|
camera.update();
|
||||||
@ -160,7 +164,7 @@ public class BoardAppState extends MonopolyAppState {
|
|||||||
super.update(tpf);
|
super.update(tpf);
|
||||||
//TODO remove this only for camera testing
|
//TODO remove this only for camera testing
|
||||||
cameraAngle += TWO_PI * 0.05f * tpf;
|
cameraAngle += TWO_PI * 0.05f * tpf;
|
||||||
adjustCamera();
|
// adjustCamera();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -173,9 +173,13 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga
|
|||||||
final AppSettings settings = new AppSettings(true);
|
final AppSettings settings = new AppSettings(true);
|
||||||
settings.setTitle(lookup("monopoly.name"));
|
settings.setTitle(lookup("monopoly.name"));
|
||||||
try {
|
try {
|
||||||
settings.setIcons(new Image[]{ImageIO.read(new File("src/main/resources/icons/Uniman.png"))});
|
// Prüfen, ob das Betriebssystem ein Mac-System ist
|
||||||
}
|
if (!System.getProperty("os.name").toLowerCase().contains("mac")) {
|
||||||
catch (IOException e) {
|
settings.setIcons(new Image[]{ImageIO.read(new File("src/main/resources/icons/Uniman.png"))});
|
||||||
|
} else {
|
||||||
|
LOGGER.log(Level.INFO, "Icon setting skipped on macOS due to system restrictions.");
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
LOGGER.log(Level.ERROR, e.getMessage());
|
LOGGER.log(Level.ERROR, e.getMessage());
|
||||||
}
|
}
|
||||||
settings.setResolution(config.getResolutionWidth(), config.getResolutionHeight());
|
settings.setResolution(config.getResolutionWidth(), config.getResolutionHeight());
|
||||||
@ -288,7 +292,7 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga
|
|||||||
final StatsAppState stats = new StatsAppState(guiNode, normalFont);
|
final StatsAppState stats = new StatsAppState(guiNode, normalFont);
|
||||||
stateManager.attach(stats);
|
stateManager.attach(stats);
|
||||||
}
|
}
|
||||||
flyCam.setEnabled(false);
|
flyCam.setEnabled(true);
|
||||||
stateManager.detach(stateManager.getState(StatsAppState.class));
|
stateManager.detach(stateManager.getState(StatsAppState.class));
|
||||||
stateManager.detach(stateManager.getState(DebugKeysAppState.class));
|
stateManager.detach(stateManager.getState(DebugKeysAppState.class));
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 209 KiB |
Loading…
Reference in New Issue
Block a user