HKTMXLayer Class Reference
| 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
-
layerNamename of the layer
property -
layerSizesize of the layer in tiles
property -
mapTileSizesize of the map’s tile (could be differnt from the tile’s size)
property -
tilespointer to the map of tiles
property -
tilesetTileset information for the layer
property -
layerOrientationLayer orientation, which is the same as the map orientation
property -
propertiesproperties from the layer. They can be added using Tiled
property -
+ layerWithTilesetInfo:layerInfo:mapInfo:creates an HKTMXLayer with a tileset info, a layer info and a map info
-
– initWithTilesetInfo:layerInfo:mapInfo:initializes an HKTMXLayer with a tileset info, a layer info and a map info
-
– tileGIDAt:returns the tile gid at a given tile coordinate. if it returns 0, it means that the tile is empty.
-
– 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.
-
– removeTileAt:removes a tile at given tile coordinate
-
– positionAt:returns the position in pixels of a given tile coordinate
-
– propertyNamed:return the value for the specific property name
-
– setupTilesCreates the tiles
-
opacityCCRGBAProtocol protocol
property -
colorproperty -
blendFuncCCBlendProtocol protocol
property -
– updateScale: -
– tileFlipBitsAt: -
– setTileFlipBits:at:
Experimental Methods
Properties
blendFunc
CCBlendProtocol protocol
@property (nonatomic, readwrite) ccBlendFunc blendFuncDeclared In
HKTMXLayer.hlayerName
name of the layer
@property (nonatomic, readwrite, retain) NSString *layerNameDeclared In
HKTMXLayer.hlayerOrientation
Layer orientation, which is the same as the map orientation
@property (nonatomic, readwrite) int layerOrientationDeclared In
HKTMXLayer.hlayerSize
size of the layer in tiles
@property (nonatomic, readwrite) CGSize layerSizeDeclared In
HKTMXLayer.hmapTileSize
size of the map’s tile (could be differnt from the tile’s size)
@property (nonatomic, readwrite) CGSize mapTileSizeDeclared In
HKTMXLayer.hopacity
CCRGBAProtocol protocol
@property (nonatomic, readwrite) GLubyte opacityDeclared In
HKTMXLayer.hproperties
properties from the layer. They can be added using Tiled
@property (nonatomic, readwrite, retain) NSMutableArray *propertiesDeclared In
HKTMXLayer.hInstance 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 *)mapInfoDeclared In
HKTMXLayer.hpositionAt:
returns the position in pixels of a given tile coordinate
- (CGPoint)positionAt:(CGPoint)tileCoordinateDeclared In
HKTMXLayer.hpropertyNamed:
return the value for the specific property name
- (id)propertyNamed:(NSString *)propertyNameDeclared In
HKTMXLayer.hremoveTileAt:
removes a tile at given tile coordinate
- (void)removeTileAt:(CGPoint)tileCoordinateDeclared In
HKTMXLayer.hsetTileGID: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)tileCoordinateDeclared In
HKTMXLayer.h