just add code i forgot about
parent
7b745e7202
commit
a23d87d347
|
@ -35,6 +35,7 @@ public class LiteCraftMain implements Runnable
|
|||
public static int width = 640, height = 480, maxFPS = 60; // Don't change these values. They just initialize it in case we forget to set them later.
|
||||
public static boolean spamLog = false, debug = false, limitFPS = false;
|
||||
public String splashText = "";
|
||||
@SuppressWarnings("unused")
|
||||
private int fps, ups, tps;
|
||||
private long frameTimer;
|
||||
protected Timer timer;
|
||||
|
@ -122,10 +123,12 @@ public class LiteCraftMain implements Runnable
|
|||
// Things that the game should do over and over and over again until it is closed
|
||||
private void loop()
|
||||
{
|
||||
|
||||
ups++;
|
||||
// Poll for window events. The key callback above will only be invoked during this call.
|
||||
GLFW.glfwPollEvents();
|
||||
Input.invokeAllListeners();
|
||||
RenderWrapper.update();
|
||||
timer.tick();
|
||||
if (fps < maxFPS || !limitFPS) render();
|
||||
if (System.currentTimeMillis() > frameTimer + 1000) // wait for one second
|
||||
|
|
|
@ -75,4 +75,11 @@ public class RenderWrapper {
|
|||
Window.create(2000, 1200, "LiteCraft - " + splash, 60);
|
||||
GingerMain.init();
|
||||
}
|
||||
|
||||
public static void update() {
|
||||
Window.update();
|
||||
GingerMain.update();
|
||||
ParticleMaster.update(camera);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue