Inherits from CCNodeRGBA : CCNode : NSObject
Conforms to CCBlendProtocol
Declared in HKTMXLayer.h

Overview

Represents a tile animation state. When animClock == 0.0, each tile is in a state equal to its GID. After entering a state, a tile will look up the AnimRule for that state, wait delay seconds, and then switch to state next. If next is zero, it will stay in the state forever.

As an optimization, cycleTime and last provide information about the complete animation starting at this state. If last is zero, it is an endless loop with a period of cycleTime seconds. If last is nonzero, it will reach state last and terminate in a total of cycleTime seconds.

Tasks

Other Methods

Experimental Methods

Properties

blendFunc

CCBlendProtocol protocol

@property (nonatomic, readwrite) ccBlendFunc blendFunc

Declared In

HKTMXLayer.h

color

layerName

name of the layer

@property (nonatomic, readwrite, retain) NSString *layerName

Declared In

HKTMXLayer.h

layerOrientation

Layer orientation, which is the same as the map orientation

@property (nonatomic, readwrite) int layerOrientation

Declared In

HKTMXLayer.h

layerSize

size of the layer in tiles

@property (nonatomic, readwrite) CGSize layerSize

Declared In

HKTMXLayer.h

mapTileSize

size of the map’s tile (could be differnt from the tile’s size)

@property (nonatomic, readwrite) CGSize mapTileSize

Declared In

HKTMXLayer.h

opacity

CCRGBAProtocol protocol

@property (nonatomic, readwrite) GLubyte opacity

Declared In

HKTMXLayer.h

properties

properties from the layer. They can be added using Tiled

@property (nonatomic, readwrite, retain) NSMutableArray *properties

Declared In

HKTMXLayer.h

tiles

pointer to the map of tiles

@property (nonatomic, readwrite) unsigned int *tiles

Declared In

HKTMXLayer.h

tileset

Tileset information for the layer

@property (nonatomic, readwrite, retain) CCTMXTilesetInfo *tileset

Declared In

HKTMXLayer.h

Class Methods

layerWithTilesetInfo:layerInfo:mapInfo:

creates an HKTMXLayer with a tileset info, a layer info and a map info

+ (id)layerWithTilesetInfo:(CCTMXTilesetInfo *)tilesetInfo layerInfo:(CCTMXLayerInfo *)layerInfo mapInfo:(CCTMXMapInfo *)mapInfo

Declared In

HKTMXLayer.h

Instance Methods

initWithTilesetInfo:layerInfo:mapInfo:

initializes an HKTMXLayer with a tileset info, a layer info and a map info

- (id)initWithTilesetInfo:(CCTMXTilesetInfo *)tilesetInfo layerInfo:(CCTMXLayerInfo *)layerInfo mapInfo:(CCTMXMapInfo *)mapInfo

Declared In

HKTMXLayer.h

positionAt:

returns the position in pixels of a given tile coordinate

- (CGPoint)positionAt:(CGPoint)tileCoordinate

Declared In

HKTMXLayer.h

propertyNamed:

return the value for the specific property name

- (id)propertyNamed:(NSString *)propertyName

Declared In

HKTMXLayer.h

removeTileAt:

removes a tile at given tile coordinate

- (void)removeTileAt:(CGPoint)tileCoordinate

Declared In

HKTMXLayer.h

setTile:at:

setTileFlipBits:at:

setTileGID:at:

sets the tile gid (gid = tile global id) at a given tile coordinate. The Tile GID can be obtained by using the method “tileGIDAt” or by using the TMX editor –> Tileset Mgr +1. If a tile is already placed at that position, then it will be replaced.

- (void)setTileGID:(unsigned int)gid at:(CGPoint)tileCoordinate

Declared In

HKTMXLayer.h

setupTiles

Creates the tiles

- (void)setupTiles

Declared In

HKTMXLayer.h

tileAt:

tileFlipBitsAt:

tileGIDAt:

returns the tile gid at a given tile coordinate. if it returns 0, it means that the tile is empty.

- (unsigned int)tileGIDAt:(CGPoint)tileCoordinate

Declared In

HKTMXLayer.h

updateScale: