Inherits from NSObject
Conforms to NSXMLParserDelegate
Declared in CCTMXXMLParser.h

Overview

CCTiledMapInfo contains information regarding the Tile Map. This information is obtained from the supplied Tile Map File (TMX).

Tasks

Accessing the Tile Map Info Attributes

Creating a CCTiledMapInfo Object

Initializing a CCTiledMapInfo Object

Properties

contentScale

Content scale of the TMX file. Mostly for backwords compatibility.

@property (nonatomic, readwrite) CGFloat contentScale

Declared In

CCTMXXMLParser.h

filename

Tile Map file path.

@property (nonatomic, readwrite, strong) NSString *filename

Declared In

CCTMXXMLParser.h

layers

Map layers array.

@property (nonatomic, readwrite, strong) NSMutableArray *layers

Declared In

CCTMXXMLParser.h

mapSize

Map size.

@property (nonatomic, readwrite, assign) CGSize mapSize

Declared In

CCTMXXMLParser.h

objectGroups

Object groups.

@property (nonatomic, readwrite, strong) NSMutableArray *objectGroups

Declared In

CCTMXXMLParser.h

orientation

Map orienatation method.

@property (nonatomic, readwrite, assign) int orientation

Declared In

CCTMXXMLParser.h

properties

Properties dictionary.

@property (nonatomic, readwrite, strong) NSMutableDictionary *properties

Declared In

CCTMXXMLParser.h

resources

Tile Map resource file path.

@property (nonatomic, readwrite, strong) NSString *resources

Declared In

CCTMXXMLParser.h

tileSize

Map tile size.

@property (nonatomic, readwrite, assign) CGSize tileSize

Declared In

CCTMXXMLParser.h

tilesets

Map tileset array.

@property (nonatomic, readwrite, strong) NSMutableArray *tilesets

Declared In

CCTMXXMLParser.h

Class Methods

formatWithTMXFile:

Creates and returns a CCTiledMapInfo object using the TMX format file specified.

+ (id)formatWithTMXFile:(NSString *)tmxFile

Parameters

tmxFile

CCTiledMapInfo.

Return Value

The CCTiledMapInfo Object.

Declared In

CCTMXXMLParser.h

formatWithXML:resourcePath:

Creates and returns a CCTiledMapInfo object using the TMX XML and resource file path.

+ (id)formatWithXML:(NSString *)tmxString resourcePath:(NSString *)resourcePath

Parameters

tmxString

TMX XML.

resourcePath

Resource file path.

Return Value

The CCTiledMapInfo Object.

Declared In

CCTMXXMLParser.h

Instance Methods

initWithFile:

Initializes and returns a CCTiledMapInfo object using the TMX format file specified.

- (id)initWithFile:(NSString *)tmxFile

Parameters

tmxFile

CCTiledMapInfo.

Return Value

An initialized CCTiledMapInfo Object.

Declared In

CCTMXXMLParser.h

initWithXML:resourcePath:

Initializes and returns a CCTiledMapInfo object using the TMX XML and resource file path.

- (id)initWithXML:(NSString *)tmxString resourcePath:(NSString *)resourcePath

Parameters

tmxString

TMX XML.

resourcePath

Resource file path.

Return Value

An initialized CCTiledMapInfo Object.

Declared In

CCTMXXMLParser.h