public void init(String title) {
w = new JFrame(title);
w.addKeyListener(this);
w.addMouseListener(this);
w.addMouseMotionListener(this);
w.addMouseWheelListener(this);
w.addWindowStateListener(new WindowStateListener() {
@Override
public void windowStateChanged(WindowEvent e) {
w.setExtendedState(JFrame.NORMAL);
}
});
w.setBackground(Color.black);
w.setForeground(Color.white);
w.getContentPane().setBackground(Color.black);
w.getContentPane().setIgnoreRepaint(true);
w.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frames = 0;
start = 0;
layers = new CopyOnWriteArrayList<>();
initGame();
}
GameFrame.java 文件源码
java
阅读 31
收藏 0
点赞 0
评论 0
项目:GameSetup
作者:
评论列表
文章目录