我是靠谱客的博主 甜蜜画笔,这篇文章主要介绍添加多个CCArmature,现在分享给大家,希望可以做个参考。

CCArmatureDataManager::sharedArmatureDataManager()->
addArmatureFileInfo("armature\Cowboy0.png", "armature\Cowboy0.plist", "armature\Cowboy.ExportJson");
for (int i = 0; i < 5; i++)
{
cocos2d::extension::CCArmature *armature = cocos2d::extension::CCArmature::create("Cowboy");
armature->getAnimation()->playWithIndex(0);
armature->setPosition(ccp(CCDirector::sharedDirector()->getWinSize().width / 2,
CCDirector::sharedDirector()->getWinSize().height / 2));
armature->setScale(0.2f);
addChild(armature, 0, i);
}
getChildByTag(0)->setAnchorPoint(ccp(0, 0));
getChildByTag(1)->setAnchorPoint(ccp(0, 1));
getChildByTag(2)->setAnchorPoint(ccp(1, 0));
getChildByTag(3)->setAnchorPoint(ccp(1, 1));
getChildByTag(4)->setAnchorPoint(ccp(0.5, 0.5));

 

最后

以上就是甜蜜画笔最近收集整理的关于添加多个CCArmature的全部内容,更多相关添加多个CCArmature内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(66)

评论列表共有 0 条评论

立即
投稿
返回
顶部