Search in sources :

Example 6 with Level

use of net.catacombsnatch.game.world.level.Level 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

Level (net.catacombsnatch.game.world.level.Level)6 Entity (com.badlogic.ashley.core.Entity)2 MapLayer (com.badlogic.gdx.maps.MapLayer)1 MapObject (com.badlogic.gdx.maps.MapObject)1 MapObjects (com.badlogic.gdx.maps.MapObjects)1 TiledMapTileLayer (com.badlogic.gdx.maps.tiled.TiledMapTileLayer)1 Cell (com.badlogic.gdx.maps.tiled.TiledMapTileLayer.Cell)1 Vector2 (com.badlogic.gdx.math.Vector2)1 Destroyable (net.catacombsnatch.game.entity.components.Destroyable)1 LocalPlayer (net.catacombsnatch.game.player.LocalPlayer)1 Player (net.catacombsnatch.game.player.Player)1 View (net.catacombsnatch.game.world.level.View)1 Type (net.catacombsnatch.game.world.level.generator.RandomLevelGenerator.Cell.Type)1 GeneratorStringOption (net.catacombsnatch.game.world.level.generator.options.GeneratorStringOption)1