Juegos Para Android Version 4.1.2 【Direct ◉】

public String getCurrentState() return score + "," + playerX + "," + playerY;

@Override protected void onPause() super.onPause(); gameView.pause(); gameManager.saveGameState(gameId, gameView.getCurrentState());

public void resume() playing = true; gameThread = new Thread(this); gameThread.start(); juegos para android version 4.1.2

@Override public void run() while (playing) update(); draw(); controlFPS();

public void pause() playing = false; try gameThread.join(); catch (InterruptedException e) e.printStackTrace(); public String getCurrentState() return score + "," +

// LibGDX core game class public class MyGame extends Game @Override public void create() setScreen(new GameScreen());

// GameView.java public class GameView extends SurfaceView implements Runnable private Thread gameThread = null; private SurfaceHolder holder; private volatile boolean playing = false; private int screenWidth, screenHeight; private float playerX = 100; private float playerY = 100; private int score = 0; public GameView(Context context) super(context); holder = getHolder(); " + playerX + "

// GameScreen.java public class GameScreen implements Screen private OrthographicCamera camera; private SpriteBatch batch; private Texture playerTexture; private Vector2 playerPosition;