Commit 61ccde9e authored by liujiaxin's avatar liujiaxin

1

parent ddb14d82
......@@ -237,23 +237,29 @@ export default class PengPeng extends cc.Component {
// dragonDisplay.dragonAtlasAsset.destroy();
// dragonDisplay.dragonAsset.destroy();
let c1 = false;
let c2 = false;
if (u1 && typeof u1 == 'string' && u1.startsWith('http')) {
console.log('release1', u1)
dragonDisplay.dragonAtlasAsset.destroy();
cc.assetManager.releaseAsset(dragonDisplay.dragonAtlasAsset.texture);
cc.assetManager.releaseAsset(u1);
c1 = true;
}
if (u2 && typeof u2 == 'string' && u2.startsWith('http')) {
console.log('release1', u2)
dragonDisplay.dragonAsset.destroy();
cc.assetManager.releaseAsset(u2);
c2 = true;
}
if (c1 && c2) {
const currentArmature = dragonDisplay.armature()
if (currentArmature) {
currentArmature.dispose()
}
}
dragonDisplay.dragonAsset = null;
dragonDisplay.dragonAtlasAsset = null;
dragonDisplay.armatureName = "";
......
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