0
votes

I created sprite sheets with Zwoptex and generated the .plist file. I am having issues linking these sprite sheets to my iOS game. I loaded the .plist and .png files created on Zwoptex to Xcode, but the changes are not being recognized. I don't know why this is happening. The game was created with cocos.

Thanks!

1
more info needed … what did you try? What result do you get and what are you expecting? Any warning/error messages? - LearnCocos2D
I used Zwoptex to create sprite sheets and the .plist files. I manually added the .plist and the related .png files to the xcode project. All these files do show up on the Project Navigator, so I do see them. I proceeded to update the AppDelegate.m on the project using the following code: - esierr1
// Removes the startup flicker [self removeStartupFlicker]; // Load the sprite files if ( [GameUtils sharedUtils].deviceType == kDeviceIPad ) { [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"Images.plist"]; [CCSpriteBatchNode batchNodeWithFile:@"Images.png"]; [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"Images@2x~ipad.plist"]; [CCSpriteBatchNode batchNodeWithFile:@"Images@2x~ipad.png"]; - esierr1
The @2x~ipad files were the recently added to the xcode project. Once I save and I run my project, it doesn't recognize the newly added files. I don't know what is going on. Please help me. Thanks! - esierr1

1 Answers

0
votes

Here is an example of how to use a spriteSheet in cocos2d im not sure if this is what your looking for as to the lack of detail but

 [[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];