m_pArmature = CCArmature::create(_strsrc->getCString());
<span style="white-space:pre"> </span>
m_pArmature->getAnimation()->play("Animation1");<span style="white-space:pre"> </span>
m_pArmature->getAnimation()->setMovementEventCallFunc(this,movementEvent_selector(PetLayer::ArmaturePlay));
m_pArmature->getBone("head")->addDisplay(CCSprite::createWithSpriteFrameName("IronWire_1.png"),0);
m_pArmature->getBone("head")->addDisplay(CCSprite::createWithSpriteFrameName("IronWire_2.png"),1);
m_pArmature->getBone("head")->addDisplay(CCSprite::createWithSpriteFrameName("IronWire_3.png"),2);
m_pArmature->getBone("head")->changeDisplayWithIndex(0, true);
或
m_pArmature->getBone("head")->changeDisplayWithIndex(1, true);
或
m_pArmature->getBone("head")->changeDisplayWithIndex(2, true);
this->addChild(m_pArmature);
CCArmature更换骨骼渲染资源
最新推荐文章于 2020-03-04 16:42:22 发布