From ab5222fd07f4f1b661fed942ed54a53f94de7b62 Mon Sep 17 00:00:00 2001 From: andreas Date: Sat, 1 Nov 2014 21:59:33 +0100 Subject: [PATCH] =?UTF-8?q?Automatisches=20Laden=20des=20Bildes=20f=C3=BCr?= =?UTF-8?q?=20StaticObject?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HeatUp/src/de/heatup/objects/StaticObject.java | 1 + HeatUp/src/de/heatup/ui/GameInterface.java | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HeatUp/src/de/heatup/objects/StaticObject.java b/HeatUp/src/de/heatup/objects/StaticObject.java index 6f52bc7..13ed0c1 100644 --- a/HeatUp/src/de/heatup/objects/StaticObject.java +++ b/HeatUp/src/de/heatup/objects/StaticObject.java @@ -36,6 +36,7 @@ public class StaticObject extends JComponent { this.staticObjectWidth = staticObjectWidth; this.staticObjectHeight = staticObjectHeight; loadBufferedImage(); + setAutoBounds(location.x, location.y); } public StaticObject(char staticObjectType, Point location) { diff --git a/HeatUp/src/de/heatup/ui/GameInterface.java b/HeatUp/src/de/heatup/ui/GameInterface.java index da416b9..11df05c 100644 --- a/HeatUp/src/de/heatup/ui/GameInterface.java +++ b/HeatUp/src/de/heatup/ui/GameInterface.java @@ -102,8 +102,7 @@ public class GameInterface extends JFrame { */ Point p1 = new Point(100, 100); StaticObject sObj1 = new StaticObject('d',p1); - //sObj1.setBounds(100, 10, 36, 64); - sObj1.setAutoBounds(100, 100); + gameWindow.gamePanel.add(sObj1);