From 2668fe8c3fed64ca94ffb2a51416b01780ab347c Mon Sep 17 00:00:00 2001 From: toksikk Date: Tue, 4 Nov 2014 17:07:36 +0100 Subject: [PATCH] Kleine Korrekturen --- HeatUp/src/de/heatup/cfg/Config.java | 17 ++++++++++++++--- .../de/heatup/mapengine/MapObjectHandler.java | 6 ++++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/HeatUp/src/de/heatup/cfg/Config.java b/HeatUp/src/de/heatup/cfg/Config.java index 7b8fd5f..8d12205 100644 --- a/HeatUp/src/de/heatup/cfg/Config.java +++ b/HeatUp/src/de/heatup/cfg/Config.java @@ -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.* + */ } diff --git a/HeatUp/src/de/heatup/mapengine/MapObjectHandler.java b/HeatUp/src/de/heatup/mapengine/MapObjectHandler.java index 5824d44..7e9372b 100644 --- a/HeatUp/src/de/heatup/mapengine/MapObjectHandler.java +++ b/HeatUp/src/de/heatup/mapengine/MapObjectHandler.java @@ -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 allMapObjects = new ArrayList(); private static ArrayList allWallObjects = new ArrayList(); @@ -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);