在工程的hellocpp里面尝试去加载场景编辑器生成的json,
是在bool HelloWorld::init() 这个里面的关闭图标之后加了如下代码,场景编辑器生成的资源都加进来了,
CCNode *pNode = CCJsonReader::sharedJsonReader()->createNodeWithJsonFile(“NewProject.json”);
if (pNode == NULL)
{
return NULL;
}
CCComRender pbuger= (CCComRender)pNode->getChildByTag(1)->getComponent(“CCArmature”);
CCArmature *pBugerRun =(CCArmature *)pbuger->getRender();
pBugerRun->getAnimation()->playByIndex(0);
,运行的时候跑到第一行就报错了b2PolygonShape.cpp:137
edge.LengthSquared()>1.192092896e-07F*
然后我就把我的json换成了工程自带的FishJoy2.json和blowFish,跑到第一行依然报错,
不过是报ccnode.cpp:619 expression:child !=0 。怎么在测试工程里是没有问题的呢?
需要做什么初始的动作吗?还是其他什么没考虑到?求解!!