我用Zwoptex创建了精灵工作表,并生成了.plist文件。我在将这些精灵表单链接到我的iOS游戏时遇到了问题。我将在Zwoptex上创建的.plist和.png文件加载到Xcode中,但无法识别这些更改。我不知道为什么会发生这种事。这个游戏是用cocos创建的。
谢谢!
发布于 2012-08-10 05:52:36
下面是一个如何在cocos2d中使用spriteSheet的示例。由于缺乏细节,我不确定这是否是您想要的,但是
[[CCSpriteFrameCache sharedSpriteFrameCache]addSpriteFramesWithFile:@"TreeSequance.plist"];
CCSpriteBatchNode *treeSheet = [CCSpriteBatchNode batchNodeWithFile:@"TreeSequance.png"];
CCSprite *smallerTree = [CCSprite spriteWithSpriteFrameName:@"Tree1.png"];
smallerTree.position = ccp(500,500);
[treeSheet addChild:smallerTree];
[self addChild:treeSheet];https://stackoverflow.com/questions/11889171
复制相似问题