游戏退出,安卓停止线程抛出异常

2018-02-23 07:33:13来源:cnblogs.com作者:Faxcom人点击

分享

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
// ȫ���ö�
prepare(0);
game = new Thread(thread);
thread = new GameThread();
game.start();
}
   @Override
protected void onRestart() {
super.onRestart();
ExitGame = false;
}
   @Override
protected void onPause() {
// thread.stop();
super.onPause();
}

@Override
protected void onDestroy() {
super.onDestroy();
// mOrientationListener.disable();

}

class GameThread implements Runnable {
Message msg;
boolean exitflag = false;

@Override
public void run() {// �[�

最新文章

123

最新摄影

闪念基因

微信扫一扫

第七城市微信公众平台