Commit 54470875 authored by asdf's avatar asdf

取消预乘

parent dda96c61
...@@ -50,7 +50,6 @@ cc.Class({ ...@@ -50,7 +50,6 @@ cc.Class({
} }
}, },
loadDragonBone() { loadDragonBone() {
GameData.dragonBoneCount++;
this.dragonBone.dragonAtlasAsset = null; this.dragonBone.dragonAtlasAsset = null;
this.dragonBone.dragonAsset = null; this.dragonBone.dragonAsset = null;
this.dragonBone.armatureName = ''; this.dragonBone.armatureName = '';
...@@ -87,13 +86,9 @@ cc.Class({ ...@@ -87,13 +86,9 @@ cc.Class({
} }
this.dragonBone.armatureName = data.name; this.dragonBone.armatureName = data.name;
this.animationName = data.animation[0].name; this.animationName = data.animation[0].name;
// this.dragonBone.premultipliedAlpha = true;
GameData.dragonBoneCount--; // atlas.texture.setPremultiplyAlpha(true);
if (GameData.dragonBoneCount == 0) {
this.dragonBone.premultipliedAlpha = true;
atlas.texture.setPremultiplyAlpha(true);
}
} }
}); });
} }
......
...@@ -31,7 +31,6 @@ cc.Class({ ...@@ -31,7 +31,6 @@ cc.Class({
}, },
loadDragonBone() { loadDragonBone() {
GameData.dragonBoneCount++;
this.dragonBone.dragonAtlasAsset = null; this.dragonBone.dragonAtlasAsset = null;
this.dragonBone.dragonAsset = null; this.dragonBone.dragonAsset = null;
this.dragonBone.armatureName = ''; this.dragonBone.armatureName = '';
...@@ -73,11 +72,8 @@ cc.Class({ ...@@ -73,11 +72,8 @@ cc.Class({
this.dragonBone.armatureName = data.name; this.dragonBone.armatureName = data.name;
this.animationName = data.animation[0].name; this.animationName = data.animation[0].name;
GameData.dragonBoneCount--; // this.dragonBone.premultipliedAlpha = true;
if (GameData.dragonBoneCount == 0) { // atlas.texture.setPremultiplyAlpha(true);
this.dragonBone.premultipliedAlpha = true;
atlas.texture.setPremultiplyAlpha(true);
}
} }
}); });
} }
......
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