refactor(map): 移除技能框背景节点相关代码
1. 删除SskillBoxComp中bg_node属性和updateBgNode方法 2. 精简prefab中冗余的节点配置 3. 修复CardLiteComp的canup渲染覆盖问题
This commit is contained in:
@@ -80,6 +80,8 @@ export class CardLiteComp extends CCComp {
|
||||
this.bindEvents();
|
||||
this.opacityComp = this.node.getComponent(UIOpacity) || this.node.addComponent(UIOpacity);
|
||||
this.opacityComp.opacity = 255;
|
||||
// onLoad 在 addChild 时才触发,晚于 setHeroByUuid;此处按已赋值的数据重新判定 canup,避免覆盖渲染结果
|
||||
this.refreshCanUp();
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
@@ -104,6 +106,7 @@ export class CardLiteComp extends CCComp {
|
||||
this.card_uuid = uuid;
|
||||
this.node.active = true;
|
||||
this.applyHeroUI(hero);
|
||||
this.refreshCanUp();
|
||||
mLogger.log(this.debugMode, "CardLiteComp", "setHeroByUuid", { uuid });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user