Exemplo n.º 1
0
 public void surfaceDestroyed(SurfaceHolder holder) {
   boolean retry = true;
   thread.setRunning(false);
   while (retry) {
     try {
       thread.join();
       retry = false;
     } catch (InterruptedException e) {
     }
   }
 }
Exemplo n.º 2
0
  public boolean onTouchEvent(MotionEvent event) {

    if (event.getAction() == MotionEvent.ACTION_DOWN) {
      if (event.getY() > getHeight() - 50) {
        thread.setRunning(false);
        ((Activity) getContext()).finish();
      } else {
        thread.world.UseTurb();
      }
    }

    return super.onTouchEvent(event);
  }
Exemplo n.º 3
0
 public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
   thread.setSurfaceSize(width, height);
 }
Exemplo n.º 4
0
 public void surfaceCreated(SurfaceHolder holder) {
   thread = new DoodleThread(new Handler());
   thread.setRunning(true);
   thread.start();
 }