Java 似乎找不到我的构造函数,我不知道出了什么问题。抛出 InterruptedException 有问题吗?任何帮助将不胜感激,谢谢!
package gameloop;
import javax.swing.*;
public class GameLoop extends JFrame {
private boolean isRunning;
public int drawx = 0;
public int drawy = 0;
public void GameLoop() throws InterruptedException{
setSize(700, 700);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLocationRelativeTo(null);
setVisible(true);
while(isRunning){
doGameUpdate();
render();
Thread.sleep(1);
if (isRunning){
GameLoop();
}
}
}
private void doGameUpdate() {
GameUpdate GU = new GameUpdate();
}
private void render() {
Draw dr = new Draw();
}
public static void main(String[] args) {
GameLoop GL = new GameLoop();
}
}