TMXGenerator Class Reference
Inherits from | NSObject |
Declared in | TMXGenerator.h |
Overview
@class TMXGenerator Class that generates a single TMX map with multiple layers. Keep in mind this won’t build a world for you, it will just create a TMX file based on data it’s fed.
Tasks
-
delegate
property -
– generateAndSaveTMXMap:
Call this to generate your map & save it to filepath, provided by delegate. Returns NO and an error if the map isn’t generated, otherwise returns YES.
-
– generateMapXML:
-
+ tileSetWithImage:named:width:height:tileSpacing:
Prepares tileset setup info with image filename, tileset name, size of tiles & spacing between them. (See TMXGeneratorTestLayer for how-to.)
-
+ layerNamed:width:height:data:visible:
Prepare layer setup info with given size in tiles, some additional data and visibilaty. (See TMXGeneratorTestLayer for how-to.
-
+ makeObjectWithName:type:x:y:width:height:properties:
Prepare single object with given name, type, position, size & properties dictionary. (See TMXGeneratorTestLayer for how-to.
Class Methods
layerNamed:width:height:data:visible:
Prepare layer setup info with given size in tiles, some additional data and visibilaty. (See TMXGeneratorTestLayer for how-to.
+ (NSDictionary *)layerNamed:(NSString *)layerName width:(int)width height:(int)height data:(NSData *)binaryLayerData visible:(BOOL)isVisible
Declared In
TMXGenerator.h
makeObjectWithName:type:x:y:width:height:properties:
Prepare single object with given name, type, position, size & properties dictionary. (See TMXGeneratorTestLayer for how-to.
+ (NSDictionary *)makeObjectWithName:(NSString *)name type:(NSString *)type x:(int)x y:(int)y width:(int)width height:(int)height properties:(NSDictionary *)properties
Declared In
TMXGenerator.h
tileSetWithImage:named:width:height:tileSpacing:
Prepares tileset setup info with image filename, tileset name, size of tiles & spacing between them. (See TMXGeneratorTestLayer for how-to.)
+ (NSDictionary *)tileSetWithImage:(NSString *)imgName named:(NSString *)name width:(int)width height:(int)height tileSpacing:(int)spacing
Declared In
TMXGenerator.h
Instance Methods
generateAndSaveTMXMap:
Call this to generate your map & save it to filepath, provided by delegate. Returns NO and an error if the map isn’t generated, otherwise returns YES.
- (BOOL)generateAndSaveTMXMap:(NSError **)error
Parameters
- error
Pass NULL if you don’t want error description.
Declared In
TMXGenerator.h