cocos2dx SpriteBatchNode 精灵的渲染优化类

用处是减少对精灵的渲染次数,用法如下

1     SpriteFrameCache::getInstance()->addSpriteFramesWithFile("person.plist");
2     SpriteBatchNode *node = SpriteBatchNode::create("person.png");
3     bg->addChild(node);
4     
5     SpriteFrame *frame = SpriteFrameCache::getInstance()->getSpriteFrameByName("navigationbar_back.png");
6     Sprite *spt1 = Sprite::createWithSpriteFrame(frame);
7     
8     node->addChild(spt1);
原文地址:https://www.cnblogs.com/wanyongjian/p/5060697.html