Add method to get an array of all the tiles as mirages

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@789 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Charlie Groves
2009-03-24 20:14:19 +00:00
parent 8f6e10af8f
commit afc8a7e4c7
@@ -245,6 +245,21 @@ public abstract class TileSet
return getTileMirage(tileIndex, getColorizations(tileIndex, null));
}
/**
* Returns prepared versions of the images that would be used for each of the tiles. Because
* tilesets are often used simply to provide access to a collection of uniform images, this
* method is provided to bypass the creation of a {@link Tile} objects when all that is
* desired is access to the underlying images.
*/
public Mirage[] getTileMirages ()
{
Mirage[] mirages = new Mirage[getTileCount()];
for (int ii = 0; ii < mirages.length; ii++) {
mirages[ii] = getTileMirage(ii);
}
return mirages;
}
/**
* Returns a prepared version of the image that would be used by the tile at the specified
* index. Because tilesets are often used simply to provide access to a collection of uniform