From ddde7ddde30169d4602c357b25d2535d8628cc67 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Sun, 26 Oct 2014 11:46:17 +0100 Subject: [PATCH] Move setHZ() calls to Main.java. --- src/de/teamteamteam/spacescooter/Main.java | 2 ++ src/de/teamteamteam/spacescooter/threads/PaintThread.java | 1 - src/de/teamteamteam/spacescooter/threads/UpdateThread.java | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/teamteamteam/spacescooter/Main.java b/src/de/teamteamteam/spacescooter/Main.java index c05566f..dfa775e 100644 --- a/src/de/teamteamteam/spacescooter/Main.java +++ b/src/de/teamteamteam/spacescooter/Main.java @@ -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(); } diff --git a/src/de/teamteamteam/spacescooter/threads/PaintThread.java b/src/de/teamteamteam/spacescooter/threads/PaintThread.java index 5d27d2d..946a9ff 100644 --- a/src/de/teamteamteam/spacescooter/threads/PaintThread.java +++ b/src/de/teamteamteam/spacescooter/threads/PaintThread.java @@ -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() { diff --git a/src/de/teamteamteam/spacescooter/threads/UpdateThread.java b/src/de/teamteamteam/spacescooter/threads/UpdateThread.java index 385d43a..2ea79bd 100644 --- a/src/de/teamteamteam/spacescooter/threads/UpdateThread.java +++ b/src/de/teamteamteam/spacescooter/threads/UpdateThread.java @@ -9,7 +9,6 @@ public class UpdateThread extends TimedThread { public UpdateThread() { this.setName("UpdateThread"); - this.setHz(60); } public void work() {