com.threerings.miso.tile
Class BaseTileSet
java.lang.Object
com.threerings.media.tile.TileSet
com.threerings.media.tile.SwissArmyTileSet
com.threerings.miso.tile.BaseTileSet
- All Implemented Interfaces:
- Serializable, Cloneable
public class BaseTileSet
- extends SwissArmyTileSet
The base tileset extends the swiss army tileset to add support for tile
passability. Passability is used to determine whether traverser objects
(generally sprites made to "walk" around the scene) can traverse a
particular tile in a scene.
- See Also:
- Serialized Form
|
Field Summary |
protected boolean[] |
_passable
Whether each tile is passable. |
|
Method Summary |
protected Tile |
createTile()
Creates a blank tile of the appropriate type for this tileset. |
boolean[] |
getPassability()
Returns the passability information for the tiles in this tileset. |
protected void |
initTile(Tile tile,
int tileIndex,
Colorization[] zations)
Initializes the supplied tile. |
void |
setPassability(boolean[] passable)
Sets the passability information for the tiles in this tileset. |
protected void |
toString(StringBuilder buf)
Derived classes can override this, calling super.toString(buf) and then
appending additional information to the buffer. |
| Methods inherited from class com.threerings.media.tile.SwissArmyTileSet |
computeTileBounds, computeTileCount, getHeights, getTileCount, getTileCounts, getWidths, setGapSize, setHeights, setOffsetPos, setTileCounts, setWidths |
| Methods inherited from class com.threerings.media.tile.TileSet |
checkTileIndex, clone, clone, getColorizations, getImagePath, getName, getRawTileImage, getRawTileSetImage, getTile, getTile, getTile, getTileMirage, getTileMirage, getTileMirages, reportCachePerformance, setImagePath, setImageProvider, setName, toString |
_passable
protected boolean[] _passable
- Whether each tile is passable.
BaseTileSet
public BaseTileSet()
setPassability
public void setPassability(boolean[] passable)
- Sets the passability information for the tiles in this tileset.
Each entry in the array corresponds to the tile at that tile index.
getPassability
public boolean[] getPassability()
- Returns the passability information for the tiles in this tileset.
createTile
protected Tile createTile()
- Description copied from class:
TileSet
- Creates a blank tile of the appropriate type for this tileset.
- Overrides:
createTile in class TileSet
- Returns:
- a blank tile ready to be populated with its image and metadata.
initTile
protected void initTile(Tile tile,
int tileIndex,
Colorization[] zations)
- Description copied from class:
TileSet
- Initializes the supplied tile. Derived classes can override this method to add in their own
tile information, but should be sure to call
super.initTile().
- Overrides:
initTile in class TileSet
- Parameters:
tile - the tile to initialize.tileIndex - the index of the tile.zations - the colorizations to be used when generating the tile image.
toString
protected void toString(StringBuilder buf)
- Description copied from class:
TileSet
- Derived classes can override this, calling
super.toString(buf) and then
appending additional information to the buffer.
- Overrides:
toString in class SwissArmyTileSet