1
我試圖通過TexturePacker使用multipacking來處理同一個sprite的多個動畫。我在TexturePacker中添加了所有圖像併發布了它們,沒有問題。我已經將它們添加到我的項目的Resources文件夾中,我甚至可以在Finder中看到它們。在Cocos2d中加載multipack spritesheet時找不到文件
當我試圖把這種
-(CCSpriteBatchNode*)createSpritesheet {
[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"Clea1.plist"];
CCSpriteBatchNode *spritesheet = [CCSpriteBatchNode batchNodeWithFile:@"Clea1.png"];
return spritesheet;
}
我風與以下錯誤:
2013-08-21 00:08:13.024 HFZ[10498:a0b] -[CCFileUtils fullPathForFilename:resolutionType:] : cocos2d: Warning: File not found: Clea1.plist
2013-08-21 00:08:13.025 HFZ[10498:a0b] cocos2d: CCSpriteFrameCache: Trying to use file 'Clea1.png' as texture
2013-08-21 00:08:13.025 HFZ[10498:a0b] -[CCFileUtils fullPathForFilename:resolutionType:] : cocos2d: Warning: File not found: Clea1.png
2013-08-21 00:08:13.026 HFZ[10498:a0b] cocos2d: Couldn't find file:Clea1.png
2013-08-21 00:08:13.026 HFZ[10498:a0b] cocos2d: CCSpriteFrameCache: Frame 'CleaStand00.png' not found
我真的不明白爲什麼會這樣。在我嘗試使用multipack解決方案之前,我試圖在每個動畫中使用一個spritesheet,但這似乎是更好的路線。對此有何想法?