Search in sources :

Example 11 with Entity

use of com.badlogic.ashley.core.Entity 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)11 BoundingBox (net.catacombsnatch.game.entity.components.BoundingBox)2 Level (net.catacombsnatch.game.world.level.Level)2 Destroyable (net.catacombsnatch.game.entity.components.Destroyable)1 MiniMapObject (net.catacombsnatch.game.entity.components.MiniMapObject)1 LocalPlayer (net.catacombsnatch.game.player.LocalPlayer)1 Player (net.catacombsnatch.game.player.Player)1 View (net.catacombsnatch.game.world.level.View)1