同样是5000个sprite,加了CCSpriteBatchNode和没加效果是一样的。为什么?
CCSpriteBatchNode* batchNode = CCSpriteBatchNode::create(“runner.png”);
batchNode->setPosition(CCPointZero);
for(int i = 0;i < 5000;++i){
float x = CCRANDOM_0_1()*1280;
float y = CCRANDOM_0_1()720;
CCSprite testIcon = CCSprite::createWithTexture(batchNode->getTexture());
testIcon->setPosition( ccp(x, y) );
batchNode->addChild(testIcon);
}
this->addChild(batchNode);
for(int i = 0;i < 5000;++i){float x = CCRANDOM_0_1()*1280;
float y = CCRANDOM_0_1()720;
CCSprite testIcon = CCSprite::create(“runner.png”);
testIcon->setPosition( ccp(x, y) );
this->addChild(testIcon);
}

