Move setHZ() calls to Main.java.
This commit is contained in:
parent
95dee0b409
commit
ddde7ddde3
@ -38,10 +38,12 @@ public class Main {
|
||||
|
||||
//Initialize GameThread
|
||||
PaintThread paintThread = new PaintThread(gf);
|
||||
paintThread.setHz(60); //This may be set depending on the system graphic settings.
|
||||
paintThread.start();
|
||||
|
||||
//Initialize UpdateThread
|
||||
UpdateThread updateThread = new UpdateThread();
|
||||
updateThread.setHz(100); //This shall remain constant across all systems.
|
||||
updateThread.start();
|
||||
|
||||
}
|
||||
|
@ -14,7 +14,6 @@ public class PaintThread extends TimedThread {
|
||||
public PaintThread(GameFrame gf) {
|
||||
this.gf = gf;
|
||||
this.setName("PaintThread");
|
||||
this.setHz(60);
|
||||
}
|
||||
|
||||
public void work() {
|
||||
|
@ -9,7 +9,6 @@ public class UpdateThread extends TimedThread {
|
||||
|
||||
public UpdateThread() {
|
||||
this.setName("UpdateThread");
|
||||
this.setHz(60);
|
||||
}
|
||||
|
||||
public void work() {
|
||||
|
Loading…
Reference in New Issue
Block a user