@mike1989a 写道:
cc.loader.loadResAll('db', function (err, assets) { ///加载完动作 加载 图片 for ( let i = 0; i < assets.length; i++ ) { cc.log('resources:', assets[i]); } let dragonBones_DragonBonesAtlasAsset = assets[1]; let dragonBones_DragonBonesAsset = assets[3]; let node = new cc.Node('1213'); let armatureDisplay = node.addComponent(dragonBones.ArmatureDisplay); cc.log('armatureDisplay:', armatureDisplay); armatureDisplay.dragonAsset = dragonBones_DragonBonesAsset; armatureDisplay.dragonAtlasAsset = dragonBones_DragonBonesAtlasAsset; armatureDisplay.armatureName = 'xiaolu'; let background = self.node.getChildByName('background'); background.addChild( node, 99999 ); node.setPosition(cc.p(200, 200)); //let factory = new dragonBones.CCFactory(); //let t = dragonBones.DataParser.parseDragonBonesData(dragonBones_DragonBonesAsset.dragonBonesJson); //factory.addDragonBonesData(dragonBones_DragonBonesAsset); //factory.addTextureAtlasData(dragonBones_DragonBonesAtlasAsset); //let db = factory.buildArmatureDisplay("xiaolu"); //cc.log(t); /* */ });
然后 这个位置 报错 检查 一下 getAnimsEnum: CC_EDITOR && function (armatureName) {.....}这里会调用 这个方法 但是 这个方法 定义了CC_EDITOR
请问 这是 这么 设计的 还是bug 如果是这么 设计的 请问 我应该怎么 手动创建
帖子: 2
参与者: 1