Search in sources :

Example 1 with BoundingBox

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

the class WallTile method createFor.

@Override
public Entity createFor(Level level, int x, int y) {
    final Entity tile = Entities.createTile(level, x, y, color, textures, true);
    tile.add(new BoundingBox().set(x, y, Tiles.SIZE));
    return tile;
}
Also used : Entity(com.badlogic.ashley.core.Entity) BoundingBox(net.catacombsnatch.game.entity.components.BoundingBox)

Example 2 with BoundingBox

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

the class Entities method createBaseTile.

private static Entity createBaseTile(Level level, int x, int y, Color color, boolean isWall) {
    x *= Tiles.SIZE;
    y *= Tiles.SIZE;
    final Entity tile = createWithPosition(level, x, y);
    tile.add(level.createComponent(MiniMapObject.class).setColor(color));
    if (isWall) {
        tile.add(new BoundingBox().set(x, y, Tiles.SIZE));
    }
    return tile;
}
Also used : Entity(com.badlogic.ashley.core.Entity) BoundingBox(net.catacombsnatch.game.entity.components.BoundingBox)

Aggregations

Entity (com.badlogic.ashley.core.Entity)2 BoundingBox (net.catacombsnatch.game.entity.components.BoundingBox)2