mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 10:09:44 +02:00
Automatisches Laden des Bildes für StaticObject
This commit is contained in:
@@ -36,6 +36,7 @@ public class StaticObject extends JComponent {
|
|||||||
this.staticObjectWidth = staticObjectWidth;
|
this.staticObjectWidth = staticObjectWidth;
|
||||||
this.staticObjectHeight = staticObjectHeight;
|
this.staticObjectHeight = staticObjectHeight;
|
||||||
loadBufferedImage();
|
loadBufferedImage();
|
||||||
|
setAutoBounds(location.x, location.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
public StaticObject(char staticObjectType, Point location) {
|
public StaticObject(char staticObjectType, Point location) {
|
||||||
|
|||||||
@@ -102,8 +102,7 @@ public class GameInterface extends JFrame {
|
|||||||
*/
|
*/
|
||||||
Point p1 = new Point(100, 100);
|
Point p1 = new Point(100, 100);
|
||||||
StaticObject sObj1 = new StaticObject('d',p1);
|
StaticObject sObj1 = new StaticObject('d',p1);
|
||||||
//sObj1.setBounds(100, 10, 36, 64);
|
|
||||||
sObj1.setAutoBounds(100, 100);
|
|
||||||
gameWindow.gamePanel.add(sObj1);
|
gameWindow.gamePanel.add(sObj1);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user