mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 08:49:44 +02:00
Bugfix in Config für Map Generierung
This commit is contained in:
@@ -16,13 +16,13 @@ public class Config {
|
||||
public static int singleTilePixels = gamePanelWidth/mapMaxTilesWidth;
|
||||
public static void setGamePanelWidth(int width) {
|
||||
// Wir wollen hier keine Reste!
|
||||
while (width % mapMaxTilesHeight != 0) {
|
||||
while (width % mapMaxTilesWidth != 0) {
|
||||
width--;
|
||||
}
|
||||
gamePanelWidth = width;
|
||||
updateSingleTilePixels();
|
||||
}
|
||||
private static void updateSingleTilePixels() {
|
||||
singleTilePixels = gamePanelWidth/mapMaxTilesHeight;
|
||||
singleTilePixels = gamePanelWidth/mapMaxTilesWidth;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user