mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 09:59:45 +02:00
Kleine Korrekturen
This commit is contained in:
@@ -1,19 +1,26 @@
|
||||
package de.heatup.cfg;
|
||||
|
||||
import de.heatup.logging.Logger;
|
||||
|
||||
/*
|
||||
* Bitte hier eure Magicnumbers eintragen
|
||||
*/
|
||||
public class Config {
|
||||
/*
|
||||
* Attribute
|
||||
* de.heatup.mapengine.*
|
||||
*/
|
||||
public static final int triggerAreaAddition = 20;
|
||||
public static final int triggerAreaAddition = 20; // wird nicht gebraucht, wenn MapGrid verwendet wird
|
||||
public static final int mapMaxTilesWidth = 32;
|
||||
public static final int mapMaxTilesHeight = 24;
|
||||
public static int gamePanelWidth = 800;
|
||||
public static int singleTilePixels = gamePanelWidth/mapMaxTilesWidth;
|
||||
/*
|
||||
* Attribute
|
||||
* de.heatup.ein.anderes.package.*
|
||||
*/
|
||||
/*
|
||||
* Methoden
|
||||
* de.heatup.mapengine.*
|
||||
*/
|
||||
public static void setGamePanelWidth(int width) {
|
||||
// Wir wollen hier keine Reste!
|
||||
while (width % mapMaxTilesWidth != 0) {
|
||||
@@ -25,4 +32,8 @@ public class Config {
|
||||
private static void updateSingleTilePixels() {
|
||||
singleTilePixels = gamePanelWidth/mapMaxTilesWidth;
|
||||
}
|
||||
/*
|
||||
* Methoden
|
||||
* de.heatup.ein.anderes.package.*
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import de.heatup.objects.StaticObject;
|
||||
public class MapObjectHandler {
|
||||
|
||||
private static final int singleTileWidth = Config.singleTilePixels;
|
||||
private static final int triggerAreaAddition = Config.triggerAreaAddition;
|
||||
//private static final int triggerAreaAddition = Config.triggerAreaAddition;
|
||||
|
||||
private static ArrayList<StaticObject> allMapObjects = new ArrayList<StaticObject>();
|
||||
private static ArrayList<StaticObject> allWallObjects = new ArrayList<StaticObject>();
|
||||
@@ -35,12 +35,14 @@ public class MapObjectHandler {
|
||||
int currentTilesTotalWidth = lastPoint.x-firstPoint.x+singleTileWidth;
|
||||
int currentTilesTotalHeight = lastPoint.y-firstPoint.y+singleTileWidth;
|
||||
|
||||
/* obsolet
|
||||
int currentTriggerTilesTotalWidth = lastPoint.x-firstPoint.x+singleTileWidth+triggerAreaAddition;
|
||||
int currentTriggerTilesTotalHeight = lastPoint.y-firstPoint.y+singleTileWidth+triggerAreaAddition;
|
||||
Point currentTriggerTilesFirstPoint = new Point(firstPoint.x-(triggerAreaAddition/2),firstPoint.y-(triggerAreaAddition/2));
|
||||
*/
|
||||
|
||||
StaticObject newStaticObject = new StaticObject(currentType, firstPoint, currentTilesTotalWidth, currentTilesTotalHeight);
|
||||
// Trigger Object - auskommentieren sobald implementiert.
|
||||
// Trigger Object - obsolet
|
||||
// StaticObject newTriggerObject = new StaticObject(currentType, firstPoint, currentTilesTotalWidth, currentTilesTotalHeight, true);
|
||||
MapObjectHandler.allMapObjects.add(newStaticObject);
|
||||
// MapObjectHandler.allMapObjects.add(newTriggerObject);
|
||||
|
||||
Reference in New Issue
Block a user