Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void surfaceCreated(SurfaceHolder holder) {
- if(gt == null) {
- gt = new GameThread(getHolder(), this);
- gt.setRunning(true);
- gt.start();
- }
- }
- public void onPause(){
- ... other stuff
- if(gt != null){
- try {
- gt.setRunning(false);
- gt.join();
- gt = null;
- }catch(Exception e){
- e.printStackTrace();
- }
- }
- }
Add Comment
Please, Sign In to add comment