In today’s post I would like to share with you a handy piece of code to manage sprite sheets. I have called it TSSpriteSheetManager.
TSSpriteSheetManager is a singleton cocos2d class that allows for easily manage sprite sheets. You just add sprite sheets to the manager and then request a sprite or frame automatically batched for you. The manager will search for the sprite in all the added sprite sheets and if it is not in any of them, it will search for individual files on your project.
You have the entire source code for this project at the end of this article.