用处是减少对精灵的渲染次数,用法如下
SpriteFrameCache::getInstance()->addSpriteFramesWithFile("person.plist");
SpriteBatchNode *node = SpriteBatchNode::create("person.png");
bg->addChild(node); SpriteFrame *frame = SpriteFrameCache::getInstance()->getSpriteFrameByName("navigationbar_back.png");
Sprite *spt1 = Sprite::createWithSpriteFrame(frame); node->addChild(spt1);