com.threerings.miso.tile
Class BaseTileSet

java.lang.Object
  extended by com.threerings.media.tile.TileSet
      extended by com.threerings.media.tile.SwissArmyTileSet
          extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.media.tile.TileSet
TileSet.Colorizer
 
Field Summary
protected  boolean[] _passable
          Whether each tile is passable.
 
Fields inherited from class com.threerings.media.tile.SwissArmyTileSet
_gapSize, _heights, _numTiles, _offsetPos, _tileCounts, _widths
 
Fields inherited from class com.threerings.media.tile.TileSet
_atiles, _cacheStatThrottle, _imagePath, _improv, _key, _name, _zations
 
Constructor Summary
BaseTileSet()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_passable

protected boolean[] _passable
Whether each tile is passable.

Constructor Detail

BaseTileSet

public BaseTileSet()
Method Detail

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