Commit f743d804 authored by liujiaxin's avatar liujiaxin

1

parent 3b25ef6b
......@@ -268,10 +268,21 @@ export default class PengPeng extends cc.Component {
const [texture, atlasJson, dragonBonesJson ] = assets;
console.log(texture ? JSON.stringify(texture) : texture, atlasJson ? JSON.stringify(atlasJson) : atlasJson, dragonBonesJson? JSON.stringify(dragonBonesJson): dragonBonesJson)
// console.log(texture ? JSON.stringify(texture) : texture, atlasJson ? JSON.stringify(atlasJson) : atlasJson, dragonBonesJson? JSON.stringify(dragonBonesJson): dragonBonesJson)
console.log(texture ? texture.constructor.name : texture, atlasJson ? atlasJson.constructor.name : atlasJson, dragonBonesJson? dragonBonesJson.constructor.name: dragonBonesJson)
console.log(1)
console.log(`[atlasJson]1 ${cc.js.isChildClassOf(atlasJson, cc.TextAsset)}`)
console.log(`[atlasJson]2 ${cc.js.isChildClassOf(atlasJson, dragonBones.DragonBonesAtlasAsset)}`)
console.log(`[atlasJson]3 ${cc.js.isChildClassOf(atlasJson, dragonBones.DragonBonesAsset)}`)
console.log(`[dragonBonesJson]1 ${cc.js.isChildClassOf(atlasJson, cc.TextAsset)}`)
console.log(`[dragonBonesJson]2 ${cc.js.isChildClassOf(atlasJson, dragonBones.DragonBonesAtlasAsset)}`)
console.log(`[dragonBonesJson]3 ${cc.js.isChildClassOf(atlasJson, dragonBones.TexDragonBonesAssettAsset)}`)
let atlas = atlasJson
if (atlasJson.constructor.name == 'cc_TextAsset') {
if (cc.js.isChildClassOf(atlasJson, cc.TextAsset) || atlasJson.constructor.name == 'cc_TextAsset') {
console.log(2)
atlas = new dragonBones.DragonBonesAtlasAsset();
atlas._uuid = atlasUrl;
......@@ -283,7 +294,7 @@ export default class PengPeng extends cc.Component {
console.log(5)
}
let asset = dragonBonesJson;
if (dragonBonesJson.constructor.name == 'cc_TextAsset') {
if (cc.js.isChildClassOf(dragonBonesJson, cc.TextAsset) || dragonBonesJson.constructor.name == 'cc_TextAsset') {
console.log(6)
asset = new dragonBones.DragonBonesAsset();
asset._uuid = skeUrl;
......
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