|
Fission FSN
|
Public Member Functions | |
| __init__ (self, tileImageFile, tileWidth, tileHeight) | |
| readTiles (self) | |
| findTile (self, tileImage) | |
Public Attributes | |
| TileWidth = tileWidth | |
| TileHeight = tileHeight | |
| Filename = tileImageFile | |
| Name = os.path.splitext(tileImageFile)[0] | |
| list | List = [] |
| dict | TileDict = {} |
This class represents a set of tiles.
| MapWriter.Tileset.__init__ | ( | self, | |
| tileImageFile, | |||
| tileWidth, | |||
| tileHeight ) |
| MapWriter.Tileset.findTile | ( | self, | |
| tileImage ) |
This method returns the tile index for the given tile image if it is part of this tileset,
and returns 0 if the tile could not be found. Constant complexity due to dictionary lookup.
| MapWriter.Tileset.readTiles | ( | self | ) |
This method reads the tiles from the tileset and also fills up the tile dictionary.
| MapWriter.Tileset.Filename = tileImageFile |
| list MapWriter.Tileset.List = [] |
| MapWriter.Tileset.Name = os.path.splitext(tileImageFile)[0] |
| dict MapWriter.Tileset.TileDict = {} |
| MapWriter.Tileset.TileHeight = tileHeight |
| MapWriter.Tileset.TileWidth = tileWidth |