However, the benefits of doing this is debatable, with the following articles claiming only marginal benefits in most use cases, and with significant benefits only in certain situations:
Obviously if using CCSpriteBatchNode is easy then it's a no brainer to use it. But unfortunately it gets pretty complicated when you have a sprite that requires multiple sprite sheets. Rather than to have to figure out how it all has to work, or if it can even work in the first place, it's a pretty straightforward decision instead to not use it.
So from the sprite sheet tutorial, instead of using CCSpriteBatchNode:
- Load all the various sprite sheets into the sharedSpriteFrameCache
- Create one CCAction for every animation sequence using the frame names
- Create a Sprite directly using 1 of the frames
- Call runAction on the sprite whenever a new animation sequence needs to be run
Other References:
No comments:
Post a Comment