Exemplo n.º 1
0
  public void start(SurfaceHolder surfaceHolder) {
    gameLaunch.graphics.surfaceHolder = surfaceHolder;
    gameLaunch.readyToRun();

    thread = new Thread(gameLaunch, "GameLaunch");
    thread.start();
  }
Exemplo n.º 2
0
  public void stop() {
    gameLaunch.stopAndDispose();
    try {
      thread.join();
    } catch (InterruptedException e) {
      // Should never happen
      e.printStackTrace();
    }

    thread = null;
    gameLaunch.graphics.surfaceHolder = null;
  }