cocos2d-x3.0怎么将getboundingbox获取的碰撞框展现出来
1个回答
2015-02-07 · 知道合伙人影视综艺行家
关注
展开全部
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空的
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询