It seems that there are two ways to go - either your sprites are laid out in the usual way, and therefore they can be removed from the sprite sheet programmatically, like this first example. Another way is to use a tool such as Zwoptex to create a sprite sheet and the corresponding plist that tells Cocos2d where to find the images on the sheet, see the second example.
A tutorial for getting sprites from a worksheet using a regular layout:
http://getsetgames.com/2010/04/18/how-to-animate-sprites-in-cocos2d/
The basics:
- Get your images into one large image / texture.
- Create CCSpriteSheet using this texture
- Create CCSprite using one of the images in the sprite sheet
- Create a CCAnimation and fill it with a CCSpriteFrame - each representing a frame in the animation
- CCAnimate, , voila.
, Zwoptex, , .
:
http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection-with-cocos2d-iphone
, ,