我正试图将我保存的tilemap添加到我的快速项目中,但不幸的是,它并不适用于我。到目前为止,我已经做了这些事:
1. I have imported libz.dylib framework
2. I have a bridging-header file with these two imports:
#import "JSTileMap.h"
#import "LFCGzipUtility.h"
3. I have imported JSTileMap files and my tilemap to the project
4. I have imported the tilesets I've used到目前为止,我有这样的代码:
var tileMap = JSTileMap(named: "tilemap.tmx")
override func didMoveToView(view: SKView) {
self.anchorPoint = CGPoint(x: 0, y: 0)
tileMap.position = CGPoint(x: 0, y: 0)
addChild(tileMap)
}我检查了我的文件名,是的,它是tilemap.tmx,所以没有错误。我可以运行我的项目,但什么也没有出现。不过,我在我的控制台里收到了这条消息:
2015-05-21 16:38:28.844 PROJECT NAME[7671:507940] SKTexture: Error loading image resource: "PATH-TO-File/spritesheet.png"
2015-05-21 16:38:28.845 PROJECT NAME[7671:507940] texture image: PATH-TO-File/spritesheet.png
Size (128.000000, 128.000000)
2015-05-21 16:38:28.846 PROJECT NAME[7671:507940] SKTexture: Error loading image resource: "PATH-TO-File/backgrounds.png"
2015-05-21 16:38:28.847 PROJECT NAME[7671:507940] texture image: PATH-TO-File/backgrounds.png
Size (128.000000, 128.000000)
2015-05-21 16:38:28.847 PROJECT NAME[7671:507940] Layer Tile Layer 1 has zPosition -20.000000我希望你能提供任何帮助
发布于 2015-05-21 17:12:41
您需要确保映射的资产具有与创建映射时相同的与tmx文件( map )相关的路径。
https://stackoverflow.com/questions/30377362
复制相似问题