cocos2d spine获得骨骼动画的边界框getboundingbox,为什么都为0
1个回答
2016-07-16
展开全部
auto* node = SceneReader::getInstance() -> createNodeWithSceneFile("PKScene/PKScene.json");
addChild(node);
node10003 = node -> getChildByTag(10003);
node10004 = node -> getChildByTag(10004);
ArmatureDataManager::getInstance()->addArmatureFileInfo("HeroAction/heroAction.ExportJson");
pkArmature10003 = Armature::create("heroAction");
ComRender* armature10003 = ComRender::create(pkArmature10003,"CCArmature");
pkArmature10004 = Armature::create("heroAction");
pkArmature10004 -> setScaleX(-1.0);
ComRender* armature10004 = ComRender::create(pkArmature10004,"CCArmature");
node10003 -> addComponent(armature10003);
node10004 -> addComponent(armature10004);
上面这样的创建方法是图1的样子,在场景编辑器里面直接创建两个node空的
addChild(node);
node10003 = node -> getChildByTag(10003);
node10004 = node -> getChildByTag(10004);
ArmatureDataManager::getInstance()->addArmatureFileInfo("HeroAction/heroAction.ExportJson");
pkArmature10003 = Armature::create("heroAction");
ComRender* armature10003 = ComRender::create(pkArmature10003,"CCArmature");
pkArmature10004 = Armature::create("heroAction");
pkArmature10004 -> setScaleX(-1.0);
ComRender* armature10004 = ComRender::create(pkArmature10004,"CCArmature");
node10003 -> addComponent(armature10003);
node10004 -> addComponent(armature10004);
上面这样的创建方法是图1的样子,在场景编辑器里面直接创建两个node空的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询