Advertisement
Guest User

MyThread run loop

a guest
Dec 19th, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1.     @Override
  2.     public void run(){
  3.         while(running){
  4.             Canvas canvas = this.holder.lockCanvas();
  5.             if(canvas == null){
  6.                 this.holder.unlockCanvasAndPost(canvas);
  7.                 continue;
  8.             }
  9.            
  10.             this.render.canvas = canvas;
  11.             this.render.RenderOneStep();
  12.             this.holder.unlockCanvasAndPost(this.render.DisplayResult());
  13.             this.view.postInvalidate();
  14.         }
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement