Sync updateMult with frame time
Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com> Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
8a46cb56a6
commit
b5e5e1c611
Binary file not shown.
@ -2,7 +2,6 @@ package sig;
|
|||||||
|
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
|
|
||||||
import net.java.games.input.Component;
|
|
||||||
import net.java.games.input.Controller;
|
import net.java.games.input.Controller;
|
||||||
import net.java.games.input.ControllerEnvironment;
|
import net.java.games.input.ControllerEnvironment;
|
||||||
|
|
||||||
@ -90,7 +89,7 @@ public class RabiClone{
|
|||||||
while (true) {
|
while (true) {
|
||||||
long timePassed = System.nanoTime()-lastGameTime;
|
long timePassed = System.nanoTime()-lastGameTime;
|
||||||
lastGameTime=System.nanoTime();
|
lastGameTime=System.nanoTime();
|
||||||
double updateMult = 1/60d;
|
double updateMult = 1/120d;
|
||||||
|
|
||||||
|
|
||||||
handleGameControllers();
|
handleGameControllers();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user