style: 优化MissionCardComp代码格式与细节
调整变量类型声明的空格、代码缩进与空行规范,修复部分UI更新逻辑,修正卡牌位置数组的空格格式,统一代码书写风格
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -765,16 +765,13 @@ export class MissionCardComp extends CCComp {
|
||||
if (this.pool_lv_node) {
|
||||
this.pool_lv_node.active = true;
|
||||
const lv = Math.max(CARD_POOL_INIT_LEVEL, Math.min(CARD_POOL_MAX_LEVEL, Math.floor(this.poolLv)));
|
||||
const poolLvStr = `lv${lv}`;
|
||||
this.pool_lv_node.children.forEach(child => {
|
||||
if (child.name === "light") {
|
||||
child.active = false;
|
||||
} else if (child.name === "bg") {
|
||||
child.active = true;
|
||||
} else {
|
||||
child.active = (child.name === poolLvStr);
|
||||
const lvNode = this.pool_lv_node.getChildByName("lv");
|
||||
if (lvNode) {
|
||||
const label = lvNode.getComponent(Label);
|
||||
if (label) {
|
||||
label.string = `lv.${lv}`;
|
||||
}
|
||||
}
|
||||
});
|
||||
const widget = this.pool_lv_node.getComponent(Widget);
|
||||
if (widget) widget.updateAlignment();
|
||||
this.pool_lv_node.children.forEach(child => {
|
||||
|
||||
Reference in New Issue
Block a user