Example #1
0
 @Override
 public void render(float delta) {
   Gdx.gl.glClearColor(0.1f, 0.1f, 0.1f, 1);
   Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
   controller.update(delta);
   renderer.render();
 }
Example #2
0
  @Override
  public boolean keyDown(int keycode) {
    if (keycode == Keys.LEFT) controller.leftPressed();
    if (keycode == Keys.RIGHT) controller.rightPressed();
    if (keycode == Keys.Z) controller.jumpPressed();
    if (keycode == Keys.X) controller.firePressed();
    if (keycode == Keys.D) renderer.toggleDebug();

    return true;
  }
Example #3
0
 @Override
 public void resize(int width, int height) {
   renderer.setSize(width, height);
   this.width = width;
   this.height = height;
 }