C
- The collision enum type used.R
- The resource enum type used.T
- The tile type used.public abstract class MapTileStrategy<C extends Enum<C>,R extends Enum<R>,T extends TileStrategy<C,R>> extends MapTileGame<C,T> implements MapTilePath<C,T>
BLOC_SIZE, heightInTile, minimap, patternsDirectory, tileHeight, tileWidth, widthInTile
Constructor and Description |
---|
MapTileStrategy(int tileWidth,
int tileHeight)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
create(int widthInTile,
int heightInTile) |
CoordTile |
getClosestAvailableTile(int sx,
int sy,
int radius,
int dx,
int dy) |
CoordTile |
getClosestAvailableTile(Tiled from,
int radius,
Tiled to) |
CoordTile |
getClosestTile(Tiled from,
Tiled to,
C collision,
int radius)
Get the closest tile location around the area.
|
double |
getCost(Pathfindable mover,
int sx,
int sy,
int tx,
int ty) |
CoordTile |
getFreeTileAround(EntityStrategy entity,
int radius)
Search a free area from this area.
|
CoordTile |
getFreeTileAround(int tx,
int ty,
int radius) |
Integer |
getRef(int tx,
int ty) |
T |
getTile(Tiled tiled) |
boolean |
isAreaAvailable(int tx,
int ty,
int w,
int h,
int ignoreRef) |
boolean |
isBlocked(Pathfindable mover,
int dx,
int dy,
boolean ignoreRef) |
void |
loadCollisions(com.b3dgs.lionengine.core.Media media) |
void |
setRef(int tx,
int ty,
Integer id) |
append, clear, createMiniMap, createTile, getCollision, getCollisionFrom, getHeightInTile, getMiniMap, getNumberPatterns, getNumberTiles, getPattern, getPatterns, getPatternsDirectory, getTile, getTileHeight, getTilePixelColor, getTileWidth, getWidthInTile, isCreated, load, loadPatterns, loadTile, render, render, renderingTile, renderMiniMap, renderTile, save, saveTile, setTile
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
append, clear, getHeightInTile, getNumberPatterns, getNumberTiles, getTile, getTileHeight, getTileWidth, getWidthInTile, isCreated, loadPatterns, render
public MapTileStrategy(int tileWidth, int tileHeight)
tileWidth
- The tile width.tileHeight
- The tile height.public CoordTile getFreeTileAround(EntityStrategy entity, int radius)
entity
- The entity to search around.radius
- The search size.public CoordTile getClosestTile(Tiled from, Tiled to, C collision, int radius)
from
- The tiled reference.to
- The tiled reference.collision
- The collision to searchradius
- The search size.public void create(int widthInTile, int heightInTile)
public void loadCollisions(com.b3dgs.lionengine.core.Media media)
loadCollisions
in class MapTileGame<C extends Enum<C>,T extends TileStrategy<C,R>>
public T getTile(Tiled tiled)
getTile
in interface MapTilePath<C extends Enum<C>,T extends TileStrategy<C,R>>
public boolean isBlocked(Pathfindable mover, int dx, int dy, boolean ignoreRef)
isBlocked
in interface MapTilePath<C extends Enum<C>,T extends TileStrategy<C,R>>
public double getCost(Pathfindable mover, int sx, int sy, int tx, int ty)
getCost
in interface MapTilePath<C extends Enum<C>,T extends TileStrategy<C,R>>
public void setRef(int tx, int ty, Integer id)
setRef
in interface MapTilePath<C extends Enum<C>,T extends TileStrategy<C,R>>
public Integer getRef(int tx, int ty)
getRef
in interface MapTilePath<C extends Enum<C>,T extends TileStrategy<C,R>>
public CoordTile getFreeTileAround(int tx, int ty, int radius)
getFreeTileAround
in interface MapTilePath<C extends Enum<C>,T extends TileStrategy<C,R>>
public CoordTile getClosestAvailableTile(Tiled from, int radius, Tiled to)
getClosestAvailableTile
in interface MapTilePath<C extends Enum<C>,T extends TileStrategy<C,R>>
public CoordTile getClosestAvailableTile(int sx, int sy, int radius, int dx, int dy)
getClosestAvailableTile
in interface MapTilePath<C extends Enum<C>,T extends TileStrategy<C,R>>
public boolean isAreaAvailable(int tx, int ty, int w, int h, int ignoreRef)
isAreaAvailable
in interface MapTilePath<C extends Enum<C>,T extends TileStrategy<C,R>>
Copyright © 2014 Byron 3D Games Studio. All rights reserved.