public void createBoss1Explosion(float x, float y) { new EntityBuilder(world) .with(new Particle("particles/boss1explode.particle", x, y)) .build(); }
.with( new Breakable(), new Transform(x, y, 1, 1, 0),
public void createIndestructible(float x, float y, TextureAtlas tileTextureAtlas) { BodyDef bodyDef = new BodyDef(); bodyDef.type = BodyDef.BodyType.StaticBody; bodyDef.position.set(x, y); Body body = b2dWorld.createBody(bodyDef); PolygonShape polygonShape = new PolygonShape(); polygonShape.setAsBox(0.5f, 0.5f); FixtureDef fixtureDef = new FixtureDef(); fixtureDef.shape = polygonShape; fixtureDef.filter.categoryBits = GameManager.INDESTRUCTIIBLE_BIT; fixtureDef.filter.maskBits = GameManager.PLAYER_BIT | GameManager.ENEMY_BIT | GameManager.BOMB_BIT; body.createFixture(fixtureDef); polygonShape.dispose(); Renderer renderer = new Renderer(new TextureRegion(tileTextureAtlas.findRegion("indestructible"), 0, 0, 16, 16), 16 / GameManager.PPM, 16 / GameManager.PPM); renderer.setOrigin(16 / GameManager.PPM / 2, 16 / GameManager.PPM / 2); new EntityBuilder(world) .with( new Transform(x, y, 1f, 1f, 0), renderer ) .build(); }
.with( new Enemy(8, 1.2f, "EnemyDie1.ogg", "boss1"), new Transform(x, y, 1, 1, 0),
.with( new Enemy(1, 1.6f, "EnemyDie2.ogg"), new Transform(x, y, 1, 1, 0),
.with( new Enemy(1, 1.2f, "EnemyDie1.ogg"), new Transform(x, y, 1, 1, 0),
.with( new Enemy(1, 1.0f, "EnemyDie2.ogg", "bomb"), new Transform(x, y, 1, 1, 0),
.with( new Enemy(1, 0.8f), new Transform(x, y, 1, 1, 0),
.with( new Player(resetPlayerAbilities), new Transform(x, y, 1, 1, 0),
.with( transform, new State("normal"),
.with( new Bomb(player.bombPower, 2.0f), new Transform(body.getPosition().x, body.getPosition().y, 1, 1, 0),
.with( new Bomb(player.bombPower, 16.0f), new Transform(body.getPosition().x, body.getPosition().y, 1, 1, 0),
.with( new Explosion(), new Transform(x, y, 1, 1, 0), .with( new Explosion(), new Transform(x, y + i + 1, 1, 1, 0), .with( new Explosion(), new Transform(x, y - i - 1, 1, 1, 0), .with( new Explosion(), new Transform(x - i - 1, y, 1, 1, 0), .with( new Explosion(), new Transform(x + i + 1, y, 1, 1, 0),
.with( powerUp, new RigidBody(body),
.with( new Transform(x, y, 1f, 1f, 0), renderer