newlist

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
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));

 

posted on 2014-02-21 10:39  一枚程序  阅读(801)  评论(0)    收藏  举报