#import <TileMapAtlas.h>
Inherits AtlasNode.

Public Member Functions | |
| (id) | - initWithTileFile:mapFile:tileWidth:tileHeight: |
| (ccRGBB) | - tileAt: |
| (void) | - setTile:at: |
| (void) | - releaseMap |
Static Public Member Functions | |
| (id) | + tileMapAtlasWithTileFile:mapFile:tileWidth:tileHeight: |
Protected Attributes | |
| NSMutableDictionary * | posToAtlasIndex |
| x,y to altas dicctionary | |
| int | itemsToRender |
| numbers of tiles to render | |
Properties | |
| CGSize | contentSize |
| size of the map in pixels | |
| tImageTGA * | tgaInfo |
| info about the map file | |
It knows how to render a map based of tiles. The tiles must be in a .PNG format while the map must be a .TGA file.
For more information regarding the format, please see this post: http://blog.sapusmedia.com/2008/12/how-to-use-tilemap-editor-for-cocos2d.html
All features from AtlasNode are valid in TileMapAtlas
| - (id) initWithTileFile: | (NSString *) | tile | ||
| mapFile: | (NSString *) | map | ||
| tileWidth: | (int) | w | ||
| tileHeight: | (int) | h | ||
initializes the TileMap with a tile file (atlas) with a map file and the width and height of each tile
| - (void) releaseMap |
dealloc the map from memory
| - (void) setTile: | (ccRGBB) | tile | ||
| at: | (ccGridSize) | position | ||
sets a tile at position x,y. For the moment only channel R is used
| - (ccRGBB) tileAt: | (ccGridSize) | position |
returns a tile from position x,y. For the moment only channel R is used
| + (id) tileMapAtlasWithTileFile: | (NSString *) | tile | ||
| mapFile: | (NSString *) | map | ||
| tileWidth: | (int) | w | ||
| tileHeight: | (int) | h | ||
creates the TileMap with a tile file (atlas) with a map file and the width and height of each tile
- (int) itemsToRender [protected] |
numbers of tiles to render
- (NSMutableDictionary*) posToAtlasIndex [protected] |
x,y to altas dicctionary
- (CGSize) contentSize [read, assign] |
size of the map in pixels
content size of the TileMap
- (tImageTGA *) tgaInfo [read, assign] |
info about the map file
TileMap info
1.5.8