import java.awt.Point; import java.awt.event.KeyEvent; import javax.swing.ImageIcon; public class Level0 extends Level { public Level0() { ImageIcon bild = new ImageIcon("level0.gif"); background = bild.getImage(); Wall goal = new Wall(); goal.setGoal(true); goal.addPoint(new Point(43 , 585)); goal.addPoint(new Point(260 , 583)); goal.addPoint(new Point(260 ,724)); goal.addPoint(new Point(416 ,726)); stillObjects.add(goal); // Skapar Baronen!!! baron = new TheBaron(); baron.setPosition(500, 200); baron.changeAngle(90+180); baron.setMaxSpeed(5.0); this.setBaron(baron); } public void keyPressed(KeyEvent e) { baron.keyPressed(e); } public void keyReleased(KeyEvent e) { baron.keyReleased(e); } }