0
votes

What exactly are the restrictions on sprite sheets? The API-reference says this:

A CCSPriteSheet can reference one and only one texture (one image file, one texture atlas).

Does that mean that i can use a big 512x512 texture with lots of sprites in it like for an animation, and still be able to use a sprite sheet to render that? Even though i might have several instances of the sprite that are on different frames of the animation?

I'm currently loading textures like this

[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"fiends.plist"];

And assigning them like this

fiendSprite = [CCSprite spriteWithSpriteFrameName:spriteName];

Would i be able to draw those sprites using a sprite sheet instead even though different towers in the game are using different parts of the large texture??

1

1 Answers

0
votes

As long as you make your sprites children of your sprite sheet you should be able to do this. There are plenty of examples on the cocos2d forums along these lines, here is a good post to get you a bit more info as well.