Esempio n. 1
0
 public void update() {
   GameTimer.update();
   FramesCounter.updateFPS(gameState);
   inputManager.checkInput();
   render.renderFrame();
   Display.update();
   Display.sync(60);
   movementManager.update();
 }
Esempio n. 2
0
 public void init() {
   gameState = new GameState();
   try {
     Display.setDisplayMode(
         new DisplayMode(gameState.displayData.width, gameState.displayData.heigth));
     Display.setTitle(gameState.displayData.title);
     Display.create();
     inputManager = new InputManager(gameState);
     inputManager.init();
     movementManager = new MovementManager(gameState);
     render = new Render(gameState);
     render.init();
   } catch (LWJGLException ex) {
     destroy();
     System.out.println("Initialization Failed");
     System.out.println(ex);
     System.exit(-1);
   }
 }
Esempio n. 3
0
 public void destroy() {
   inputManager.destroy();
   Display.destroy();
 }