cocostudio导出的动画exprotjson
先异步加载 ArmatureDataManager::getInstance()->addArmatureFileInfoAsync(strEffectPath->getCString(),this,schedule_selector(PerpareFightingLayer::loadJsonAsynCallBack));
然后这样调用
Armature *ArmatureCombo = Armature::create(“guai_15_tianshi”);
ArmatureCombo->getAnimation()->playWithIndex(0);
btn->addChild(ArmatureCombo);
ArmatureCombo->setPosition(Point(btn->getContentSize().width,btn->getContentSize().height));
但是我创建很多个动画的时候就会造成游戏的卡顿
请问各位大神门有没有像batchnode
CCSpriteBatchNode* batchNode= CCSpriteBatchNode::create(“Icon.png”, 1000);
batchNode->setPosition(CCPointZero);
this->addChild(batchNode);
for(int i = 0;i <1000;++i){
int x =arc4random()�0;
int y =arc4random()d0;
CCSprite*testIcon =CCSprite::createWithTexture(batchNode->getTexture());
testIcon->setPosition( ccp(x, y) );
batchNode->addChild(testIcon);
}
只渲染一次的 不会造成卡顿的 急盼赐教