Bugfix Config, setGamePanelWidth(int width);
This commit is contained in:
1 parent
15872210fb
commit
421fca8045
1 file changed
+6
@@ -1,5 +1,7 @@
|
||||
package de.heatup.cfg;
|
||||
|
||||
import de.heatup.logging.Logger;
|
||||
|
||||
/*
|
||||
* Bitte hier eure Magicnumbers eintragen
|
||||
*/
|
||||
@@ -13,6 +15,10 @@ public class Config {
|
||||
public static int gamePanelWidth = 800;
|
||||
public static int singleTilePixels = gamePanelWidth/mapMaxTilesWidth;
|
||||
public static void setGamePanelWidth(int width) {
|
||||
// Wir wollen hier keine Reste!
|
||||
while (width % mapMaxTilesHeight != 0) {
|
||||
width--;
|
||||
}
|
||||
gamePanelWidth = width;
|
||||
updateSingleTilePixels();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user