Guest User

Untitled

a guest
Jan 19th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. @Override
  2. public void surfaceCreated(SurfaceHolder holder) {
  3. if(gt == null) {
  4. gt = new GameThread(getHolder(), this);
  5. gt.setRunning(true);
  6. gt.start();
  7. }
  8. }
  9.  
  10. public void onPause(){
  11. ... other stuff
  12. if(gt != null){
  13. try {
  14. gt.setRunning(false);
  15. gt.join();
  16. gt = null;
  17. }catch(Exception e){
  18. e.printStackTrace();
  19. }
  20. }
  21. }
Add Comment
Please, Sign In to add comment