Snake icon indicating copy to clipboard operation
Snake copied to clipboard

暂停后恢复和重新开始失灵问题及解决

Open dky1996 opened this issue 7 years ago • 0 comments

public void run() {
			while(running){
				if(pause){
					continue;
				}
				repaint();
				try {
					Thread.sleep(100);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
			
		}

continue前加个Thread.sleep(100);可以解决无限卡死问题

dky1996 avatar Jan 18 '18 08:01 dky1996