开发者

Loading sprite images from a subfolder in cocos2d

For the life of me I cannot figure out how to do this.

NSString *f开发者_开发百科ilename = @"starbackground.png";
CCSpriteBatchNode *batch = [CCSpriteBatchNode batchNodeWithFile:filename];

works great as long as the image is at the top level of my project.

How can I load an image from a subfolder such as resources? Or resources/images?


When adding folder with your project in xcode there are to options. Choose create references. Then you will be able to do what you want. In your resources the references folder is shown blue, not yellow

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜