Exemple #1
0
  public void render(SpriteBatch batch) {
    batch.begin();
    for (Platform p : platforms) p.render(batch);
    for (QBlock q : qBlocks) q.render(batch);
    for (Goomba g : goombas) g.render(batch);
    for (Pipe p : pipes) p.render(batch);

    mario.render(batch);
    batch.end();
  }
Exemple #2
0
 public void update(float delta) {
   mario.update(delta, qBlocks, pipes, platforms);
   for (Goomba g : goombas) {
     g.update(delta, qBlocks, platforms);
     if (g.position.y < -20) {
       goombas.removeValue(g, true);
       g.dispose();
     }
   }
   for (QBlock q : qBlocks) q.update(delta, qBlocks, platforms, pipes);
 }
Exemple #3
0
 public void dispose() {
   mario.dispose();
   for (QBlock q : qBlocks) q.dispose();
   for (Goomba g : goombas) g.dispose();
   for (Pipe p : pipes) p.dispose();
 }