mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 10:19:46 +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.staticObjectHeight = staticObjectHeight;
|
||||
loadBufferedImage();
|
||||
setAutoBounds(location.x, location.y);
|
||||
}
|
||||
|
||||
public StaticObject(char staticObjectType, Point location) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user