- 授权协议: MIT
- 开发语言: Objective-C
- 操作系统: OS X
- 软件首页: https://github.com/wbcyclist/SKTiledMap
- 软件文档: https://github.com/wbcyclist/SKTiledMap
软件介绍
SKTiledMap 是用于 SpriteKit 的 TMX TileMap 框架。支持 iOS 8 和 OS X 10.10 及以上版本。
这是一个用于解析 Tiled Map Editor 产生的地图的库。
安装
Cocoapods
pod 'SKTiledMap'Add
#import <SKTiledMap/SKTiledMap.h>to your source file.
Manually
Download the latest code version
Open your project in Xcode, then drag and drop
Framework/folder into your projectconfigure Dependencies
Add
#import 'SKTiledMap.h'to your source file.
基本用法
SKTMMapLayer *mapLayer = [[SKTMMapLayer alloc] initWithContentsOfFile:@"map.tmx"]; [self addChild:mapLayer];// get tile layerSKTMTileLayer *tileLayer = [mapLayer tileLayerWithName:@"Ground"];// get object layerSKTMObjectGroupLayer *objLayer = [mapLayer objectLayerWithName:@"Obj"];// get shape in object layerSKTMObjectGroupShape *heroObjShape = [objLayer shapeWithName:@"Hero"];// get custom properties[heroObjShape.model propertyForName:@"status"];// get image layerSKTMImageLayer *imgLayer = [mapLayer imageLayerWithName:@"Background"];// Coordinates System ConvertCGPoint tilePoint = [mapLayer.mapRenderer screenToTileCoords:CGPointMake(320, 600)]; CGPoint mapPoint = [mapLayer.mapRenderer tileToScreenCoords:CGPointMake(1, 1)];// more detail you can see in demo or source code.
特点:
All map types:
Orthogonal
Isometric
Isometric (staggered)
Hexagonal (staggered)
All TileLayerFormat:
XML
Base64 (uncompressed)
Base64 (gzip compressed)
Base64 (zlib compressed)
CSV
All Tile Render Ways:
Stagger Axis (X, Y)
Stagger Index (Odd, Even)
Tile Render Order (RightDown, RightUp, LeftDown, LeftUp)
Flipped/Rotated Tiles Or Objects
All ObjectGroup Shape
Rectangle
Ellipse
Polygon
Polyline
Animated tile support
路线图
请查看 TMX map format reference page.
SKTiledMap(root) └── Framework │ │-- SKTiledMap.h│ ├── Model │ |-- TMXObject│ |-- TMXTile│ |-- TMXTileset│ |-- TMXTileLayer│ |-- TMXObjectGroupNode│ |-- TMXObjectGroup│ |-- TMXImageLayer│ |-- TMXMap│ ├── Classes │ |-- SKMapRenderer│ |-- OrthogonalRenderer│ |-- IsometricRenderer│ |-- StaggeredRenderer│ |-- HexagonalRenderer│ └── SpriteKitNode |-- SKTMNode|-- SKTMTileNode|-- SKTMObjectGroupTile|-- SKTMObjectGroupShape│ |-- SKTMLayer|-- SKTMTileLayer|-- SKTMObjectGroupLayer|-- SKTMImageLayer|-- SKTMMapLayer
iOS
卓有成效的程序员
Neal Ford / 熊节 / 机械工业出版社 / 2009-3 / 45.00元
《卓有成效的程序员》就是讲述如何在开发软件的过程中变得更加高效。同时,《卓有成效的程序员》的讲述将会跨语言和操作系统:很多技巧的讲述都会伴随多种程序语言的例子,并且会跨越三种主要的操作系统,Windows(多个版本),Mac OS X以及 *-nix (Unix或者Linux)。 《卓有成效的程序员》讨论的是程序员个体的生产力,而不是团队的生产力问题,所以它不会涉及方法论(好吧,可能总会在......一起来看看 《卓有成效的程序员》 这本书的介绍吧!
