Bugfix in Config für Map Generierung
This commit is contained in:
1 parent
005c43168b
commit
50fb57dc4b
1 file changed
+2
-2
@@ -16,13 +16,13 @@ public class Config {
|
|||||||
public static int singleTilePixels = gamePanelWidth/mapMaxTilesWidth;
|
public static int singleTilePixels = gamePanelWidth/mapMaxTilesWidth;
|
||||||
public static void setGamePanelWidth(int width) {
|
public static void setGamePanelWidth(int width) {
|
||||||
// Wir wollen hier keine Reste!
|
// Wir wollen hier keine Reste!
|
||||||
while (width % mapMaxTilesHeight != 0) {
|
while (width % mapMaxTilesWidth != 0) {
|
||||||
width--;
|
width--;
|
||||||
}
|
}
|
||||||
gamePanelWidth = width;
|
gamePanelWidth = width;
|
||||||
updateSingleTilePixels();
|
updateSingleTilePixels();
|
||||||
}
|
}
|
||||||
private static void updateSingleTilePixels() {
|
private static void updateSingleTilePixels() {
|
||||||
singleTilePixels = gamePanelWidth/mapMaxTilesHeight;
|
singleTilePixels = gamePanelWidth/mapMaxTilesWidth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user