Erster Prototyp
This commit is contained in:
1 parent
7b4429b931
commit
5ec52879ac
7 files changed
+184
-1
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package de.teamteamteam.spacescooter.threads;
|
||||
|
||||
import de.teamteamteam.spacescooter.gui.GameFrame;
|
||||
|
||||
public class PaintThread extends Thread {
|
||||
|
||||
private GameFrame gf;
|
||||
|
||||
public PaintThread(GameFrame gf) {
|
||||
this.gf = gf;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
while (true) {
|
||||
try {
|
||||
Thread.sleep(16);
|
||||
} catch (InterruptedException e) {
|
||||
System.err.println(e);
|
||||
}
|
||||
this.gf.repaint();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user