Creator 1.9.1,目标平台 Web
A,B两个角色都有dragonBone,表情attack, A的slot head换了表情后,destory了,创建B角色,B角色换表情显示的还是A的表情。
initCannon: function() {
var cannon = cc.instantiate(info.prefab);
if (!this._oldGun)
this._oldGun = cc.find("UI/Panel-Gun/Gun/GunIcon", this.node)
this._oldGun.destroy();
this._oldGun = cannon;
var dp = cannon.getComponent(dragonBones.ArmatureDisplay);
var armature = dp.buildArmature("attack");
if(dp.armature().getSlot('head')){
dp.armature().getSlot('head').childArmature = armature;
}
}