Inherits from CCAtlasNode : CCNodeRGBA : CCNode : NSObject
Declared in CCTileMapAtlas.h

Overview

CCTileMapAtlas is a subclass of CCAtlasNode.

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://www.cocos2d-iphone.org/archives/27

All features from CCAtlasNode are valid in CCTileMapAtlas

IMPORTANT: This class is deprecated. It is maintained for compatibility reasons only. You SHOULD not use this class. Instead, use the newer TMX file format: CCTMXTiledMap

Tasks

Properties

tgaInfo

TileMap info

@property (nonatomic, readonly) tImageTGA *tgaInfo

Declared In

CCTileMapAtlas.h

Class Methods

tileMapAtlasWithTileFile:mapFile:tileWidth:tileHeight:

creates a CCTileMap with a tile file (atlas) with a map file and the width and height of each tile in points. The tile file will be loaded using the TextureMgr.

+ (id)tileMapAtlasWithTileFile:(NSString *)tile mapFile:(NSString *)map tileWidth:(int)w tileHeight:(int)h

Declared In

CCTileMapAtlas.h

Instance Methods

initWithTileFile:mapFile:tileWidth:tileHeight:

initializes a CCTileMap with a tile file (atlas) with a map file and the width and height of each tile in points. The file will be loaded using the TextureMgr.

- (id)initWithTileFile:(NSString *)tile mapFile:(NSString *)map tileWidth:(int)w tileHeight:(int)h

Declared In

CCTileMapAtlas.h

releaseMap

dealloc the map from memory

- (void)releaseMap

Declared In

CCTileMapAtlas.h

setTile:at:

sets a tile at position x,y. For the moment only channel R is used

- (void)setTile:(ccColor3B)tile at:(CGPoint)position

Declared In

CCTileMapAtlas.h

tileAt:

returns a tile from position x,y. For the moment only channel R is used

- (ccColor3B)tileAt:(CGPoint)position

Declared In

CCTileMapAtlas.h