Commit 29470d78 authored by 范雪寒's avatar 范雪寒

test: log

parent e0780efe
......@@ -969,6 +969,7 @@ cc.Class({
cc.loader.load({ url: atlas, type: 'txt' }, (error, atlasJson) => {
cc.loader.load({ url: ske, type: 'txt' }, (error, dragonBonesJson) => {
this.log('汪汪汪1');
const atlas = new dragonBones.DragonBonesAtlasAsset();
atlas.atlasJson = atlasJson;
atlas.texture = texture;
......@@ -983,11 +984,14 @@ cc.Class({
let armatures = json["armature"];
// console.log('armatures: ', armatures);
let armatureNames = [];
this.log('汪汪汪2');
for (let i = 0; i < armatures.length; i++) {
armatureNames.push(armatures[i].name);
}
this.log('汪汪汪3');
// console.log('armatureNames: ', armatureNames);
if (armatureNames.length > 0) {
this.log('汪汪汪4');
let defaultArmatureName = armatureNames[0];
dragonDisplay.armatureName = defaultArmatureName;
// let animationNames = dragonDisplay.getAnimationNames(defaultArmatureName);
......@@ -1003,12 +1007,13 @@ cc.Class({
dragonDisplay.playAnimation('normal', -1);
dragonDisplay.animaNames = animationNames;
animaNode.y -= 30;
this.log('汪汪汪5');
if (animaNode.height) {
animaNode.scale = 376 / animaNode.height;
}
this.log('汪汪汪');
}
this.log('汪汪汪');
});
});
});
......
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