C
- The tile collision type.T
- The type of tile used.public interface MapTilePath<C extends java.lang.Enum<C>,T extends TilePath<C>>
extends com.b3dgs.lionengine.game.map.MapTile<C,T>
Modifier and Type | Method and Description |
---|---|
com.b3dgs.lionengine.game.CoordTile |
getClosestAvailableTile(int sx,
int sy,
int radius,
int dx,
int dy)
Get the closest unused location around the area.
|
com.b3dgs.lionengine.game.CoordTile |
getClosestAvailableTile(com.b3dgs.lionengine.game.Tiled from,
int radius,
com.b3dgs.lionengine.game.Tiled to)
Get the closest unused location around the area.
|
double |
getCost(Pathfindable mover,
int sx,
int sy,
int dx,
int dy)
Get the cost of the complete path, from start till end.
|
com.b3dgs.lionengine.game.CoordTile |
getFreeTileAround(int tx,
int ty,
int radius)
Search a free area from this area.
|
java.lang.Integer |
getRef(int tx,
int ty)
Get reference id.
|
T |
getTile(com.b3dgs.lionengine.game.Tiled tiled)
Get tile from specified map location (in tile index).
|
boolean |
isAreaAvailable(int tx,
int ty,
int w,
int h,
int ignoreRef)
Check if area if unused.
|
boolean |
isBlocked(Pathfindable mover,
int dx,
int dy,
boolean ignoreRef)
Check if current location is blocking or not.
|
void |
setRef(int tx,
int ty,
java.lang.Integer id)
Set reference id.
|
T getTile(com.b3dgs.lionengine.game.Tiled tiled)
null
, this
means that there is not tile at this location. It is not an error, just a way to avoid useless tile storage.tiled
- The location.com.b3dgs.lionengine.game.CoordTile getClosestAvailableTile(com.b3dgs.lionengine.game.Tiled from, int radius, com.b3dgs.lionengine.game.Tiled to)
from
- The tiled from.radius
- The search size.to
- The tiled destination.com.b3dgs.lionengine.game.CoordTile getClosestAvailableTile(int sx, int sy, int radius, int dx, int dy)
sx
- The horizontal location.sy
- The vertical location.radius
- The search size.dx
- The horizontal destination location.dy
- The vertical destination location.com.b3dgs.lionengine.game.CoordTile getFreeTileAround(int tx, int ty, int radius)
tx
- The horizontal tile.ty
- The vertical tile.radius
- The search size.boolean isAreaAvailable(int tx, int ty, int w, int h, int ignoreRef)
tx
- The horizontal location.ty
- The vertical location.w
- The width in tile.h
- The height in tile.ignoreRef
- The id to ignore.true
if area is free (area id = 0), false
else.boolean isBlocked(Pathfindable mover, int dx, int dy, boolean ignoreRef)
mover
- The object moving on map.dx
- The horizontal destination location.dy
- The vertical destination location.ignoreRef
- The ignore map references array checking (entities id).true
if blocking, false
else.double getCost(Pathfindable mover, int sx, int sy, int dx, int dy)
mover
- The object moving on map.sx
- The starting location x.sy
- The starting location y.dx
- The ending location x.dy
- The ending location y.void setRef(int tx, int ty, java.lang.Integer id)
tx
- The horizontal index.ty
- The vertical index.id
- The id to store.java.lang.Integer getRef(int tx, int ty)
tx
- The horizontal index.ty
- The vertical index.