Search in sources :

Example 1 with Destroyable

use of net.catacombsnatch.game.entity.components.Destroyable in project Catacomb-Snatch by Catacomb-Snatch.

the class DestroyableWallTile method createFor.

@Override
public Entity createFor(Level level, final int x, final int y) {
    final Entity tile = Entities.createTile(level, x, y, color, Art.tiles_walls[0], true);
    tile.add(new Destroyable().add(new Destroyable.Callback() {

        @Override
        public void onEntityDestroyed(Level level, Entity entity) {
            Tiles.createAndAdd(Tiles.FLOOR, level, x, y);
        }
    }));
    return tile;
}
Also used : Entity(com.badlogic.ashley.core.Entity) Destroyable(net.catacombsnatch.game.entity.components.Destroyable) Level(net.catacombsnatch.game.world.level.Level)

Aggregations

Entity (com.badlogic.ashley.core.Entity)1 Destroyable (net.catacombsnatch.game.entity.components.Destroyable)1 Level (net.catacombsnatch.game.world.level.Level)1