CCArmatureDataManager::sharedArmatureDataManager()->addArmatureFileInfo( "demoplayer/DemoPlayer0.png", "demoplayer/DemoPlayer0.plist", "demoplayer/DemoPlayer.ExportJson" ); CCArmature *armature = CCArmature::create("DemoPlayer"); //armature->getAnimation()->playByIndex(0); //armature->getAnimation()->play("walk"); armature->getAnimation()->playWithIndex(4); armature->setScale( 0.5f ); armature->setPosition( ccp( origin.x + visibleSize.width/2, origin.y + visibleSize.height/2 ) ); addChild( armature ); 暂停动画:armature->getAnimation()->pause(); 恢复动画:armature->getAnimation()->resume();
cocos2d-x-2.2.3 cocostudio动作编辑器代码
最新推荐文章于 2014-10-29 21:38:13 发布