com.b3dgs.lionengine.game.map
Interface TileBasedMap<TileType extends DefaultTile>

Type Parameters:
TileType - tile type used.
All Known Subinterfaces:
PathBasedMap<TTile>
All Known Implementing Classes:
AbstractPathMap, AbstractRasteredTileMap, AbstractTileMap

public interface TileBasedMap<TileType extends DefaultTile>

Describe a map using tile for its representation. This is the lower level interface to describe a 2D map using tiles. A default implementation already exists (AbstractTiledMap)

See Also:
DefaultTile, AbstractTileMap

Method Summary
 int getHeightInTiles()
          Get number of vertical tiles.
 int getPatternsNumber()
          Get the number of used pattern.
 TileType getTile(int v, int h)
          Get tile from specified map location (in tile index).
 int getTileHeight()
          Get height of a tile.
 int getTileWidth()
          Get width of a tile.
 int getWidthInTiles()
          Get number of horizontal tiles.
 void renderTile(java.awt.Graphics2D g, int x, int y, TileType tile)
          Render a tile at specified location (in real location).
 

Method Detail

getTile

TileType getTile(int v,
                 int h)
Get tile from specified map location (in tile index).

Parameters:
v - vertical tile index location.
h - horizontal tile index location.
Returns:
tile reference.

renderTile

void renderTile(java.awt.Graphics2D g,
                int x,
                int y,
                TileType tile)
Render a tile at specified location (in real location).

Parameters:
g - graphic output.
x - real location x.
y - real location y.
tile - tile to render.

getPatternsNumber

int getPatternsNumber()
Get the number of used pattern.

Returns:
number of used pattern.

getTileWidth

int getTileWidth()
Get width of a tile.

Returns:
tile width.

getTileHeight

int getTileHeight()
Get height of a tile.

Returns:
tile height.

getWidthInTiles

int getWidthInTiles()
Get number of horizontal tiles.

Returns:
number of horizontal tiles.

getHeightInTiles

int getHeightInTiles()
Get number of vertical tiles.

Returns:
number of vertical tiles.