Super Mario Bros Java Game 240x320 -
onGround = false; if (y + height > SCREEN_HEIGHT) { y = SCREEN_HEIGHT - height; vy = 0; onGround = true; } }
// coins Iterator<Coin> coinIt = coins.iterator(); while (coinIt.hasNext()) { Coin c = coinIt.next(); if (mario.getBounds().intersects(c.getBounds())) { coinIt.remove(); score += 10; } }
// flag at end flag = new Flag((levelWidth - 3) * TILE_SIZE, 18 * TILE_SIZE - TILE_SIZE); }
// --- Tile --- class Tile { enum Type { GROUND } Type type; int x, y;
Tile(int x, int y, Type t) { this.x = x; this.y = y; this.type = t; }











