Ejemplo n.º 1
0
  public static void iterate() {
    // Dealing with the user input

    UserInterface.iterate();
    UserInterface soul = new UserInterface();
    soul.update(getPlayerEntity());

    // Dealing with the Camera
    WorldShapes.setCamera(mainCamera);
    mainCamera.setZoom(mainCamera.getZoom() * Math.pow(1.001, Mouse.getDWheel()));
    mainCamera.followParticle(mainCamera.world.Entity_HashMap.get("player").getParticle());
    mainCamera.iterate();
    mainCamera.entityDrag(); // Deals with dragging points

    // Update the physics
    updateWorld(worldOne);

    // Rendering and stuff
    Render.testResize();

    FrameBufferObject.setFrameBuffer(
        extra_frame.getFrameBufferIdentifier()); // applies the extra framebuffer
    mainCamera.render();
    FrameBufferObject.setFrameBuffer(0); // applies the normal screen

    // Drawing the framebuffer
    HUDShapes.drawTexturedQuad(
        0,
        0,
        Display.getWidth(),
        Display.getHeight(),
        extra_frame.getTexture(),
        Display.getWidth(),
        Display.getHeight());
    Display.update();
  }
Ejemplo n.º 2
0
 public static Entity getPlayerEntity() {
   return mainCamera.world.Entity_HashMap.get("player");
 }