Java 类org.newdawn.slick.CanvasGameContainer 实例源码

项目:ajario    文件:GuiClientMain.java   
public static void main(String[] args) {
    try {
        JFrame frame = new JFrame("Ajar - agar.io client by pascoej");
        AgarClient session = new AgarClient();
        session.connect(ServerChooserUtil.getServer("US-Fremont"));
        ClientGUI clientGUI = new ClientGUI(session);
        CanvasGameContainer appgc = new CanvasGameContainer(clientGUI);
        appgc.getContainer().setTargetFrameRate(60);
        appgc.getContainer().setVSync(false);
        appgc.getContainer().setShowFPS(false);
        appgc.getContainer().setMinimumLogicUpdateInterval(100);
        frame.add(appgc);
        frame.setSize(1280, 720);
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.setVisible(true);
        appgc.start();
    } catch (Exception e) {
        e.printStackTrace();
    }
}