Commit 8a91fee1 authored by liujiaxin's avatar liujiaxin

1

parent 43bda71e
......@@ -269,24 +269,34 @@ export default class PengPeng extends cc.Component {
const [texture, atlasJson, dragonBonesJson ] = assets;
console.log(texture, atlasJson, dragonBonesJson)
console.log(1)
let atlas = atlasJson
if (atlasJson.constructor.name == 'cc_TextAsset') {
console.log(2)
atlas = new dragonBones.DragonBonesAtlasAsset();
atlas._uuid = atlasUrl;
let atlasJsonStr = atlasJson.text;
atlas.atlasJson = atlasJsonStr;
console.log(3)
atlas.atlasJson = atlasJsonStr
console.log(4)
atlas.texture = texture;
console.log(5)
}
let asset = dragonBonesJson;
if (dragonBonesJson.constructor.name == 'cc_TextAsset') {
console.log(6)
asset = new dragonBones.DragonBonesAsset();
asset._uuid = skeUrl;
asset.dragonBonesJson = dragonBonesJson.text;
console.log(7)
}
console.log(4)
dragonDisplay.dragonAtlasAsset = atlas;
console.log(8)
dragonDisplay.dragonAsset = asset;
console.log(9)
dragonDisplay.armatureName = armatureName;
console.log(10)
const armature = dragonDisplay.armature()
// armature.animation.animationNames
console.log('animationName',node.name, armatureName, animationName, armature ? armature.animation.animationNames : [])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment