Quantcast
Channel: Cocos中文社区 - 最新帖子
Viewing all articles
Browse latest Browse all 494966

关于Armature::create()的问题

$
0
0

ArmatureDataManager::getInstance()->addArmatureFileInfo("hero/hero.ExportJson");

Armature* arm =Armature::create("hero");//编译报错

arm->getAnimation()->play("default");

arm->setPosition(Point(visibleSize.width*0.5,visibleSize.height*0.5));

this->addChild(arm);

PS:第二行代码编译报错,原因应该是
AnimationData *animationData = armatureDataManager->getAnimationData(name);
其中animationData=NULL;


Viewing all articles
Browse latest Browse all 494966

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>