2425262728293031323334
switch (type) { case BOMB: powerup = new Bomb(1000, new Random().nextInt(SCREEN_HEIGHT - ITEM_HEIGHT), -100f); break; case SHIELD: powerup = new Shield(1000, new Random().nextInt(SCREEN_HEIGHT - ITEM_HEIGHT), -100f); break; } return powerup; }