コード例 #1
0
ファイル: DeathGame.java プロジェクト: 0x17/DeathJam
 private void update() {
   if (player.updatePlayerPos()) {
     scroller.scrollToPos(world.scrollStart);
   }
   scroller.updateScrolling();
   player.updateInertia();
   scroller.updateCamera();
   world.update();
 }
コード例 #2
0
ファイル: DeathGame.java プロジェクト: 0x17/DeathJam
  @Override
  public void create() {
    sb = new SpriteBatch();
    fsb = new SpriteBatch();

    initBackground();

    initFonts();

    float lum = 0.3f;
    Gdx.gl.glClearColor(lum, lum, lum, 1.0f);

    world = new World();
    player = new Player(world);
    scroller = new Scroller(player);

    scroller.scrollToPos(world.scrollStart);
  }