Dirty, but working event subscribe
This commit is contained in:
parent
76057a4712
commit
7f7025219e
@ -36,6 +36,7 @@ public class ApplicationFrame implements Runnable
|
||||
|
||||
public void init(){
|
||||
jframe = new JFrame();
|
||||
jframe.setFocusable(true);
|
||||
jframe.setMinimumSize(new Dimension(600, 400));
|
||||
jframe.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||
|
||||
@ -71,9 +72,9 @@ public class ApplicationFrame implements Runnable
|
||||
|
||||
private void setGameParams(File dungeonFile) throws IOException {
|
||||
gamepanel = new Display();
|
||||
jframe.addKeyListener(new Control.KeyHandler());
|
||||
Game.instance.setDisplay(gamepanel);
|
||||
Game.instance.setDungeon(new Dungeon());
|
||||
Game.instance.startGame(dungeonFile);
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user