style: 优化MissionCardComp代码格式与细节

调整变量类型声明的空格、代码缩进与空行规范,修复部分UI更新逻辑,修正卡牌位置数组的空格格式,统一代码书写风格
This commit is contained in:
pan
2026-05-29 15:30:50 +08:00
parent 62a92ab9b6
commit 8b1f61014b
2 changed files with 1206 additions and 6170 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -765,16 +765,13 @@ export class MissionCardComp extends CCComp {
if (this.pool_lv_node) { if (this.pool_lv_node) {
this.pool_lv_node.active = true; 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 lv = Math.max(CARD_POOL_INIT_LEVEL, Math.min(CARD_POOL_MAX_LEVEL, Math.floor(this.poolLv)));
const poolLvStr = `lv${lv}`; const lvNode = this.pool_lv_node.getChildByName("lv");
this.pool_lv_node.children.forEach(child => { if (lvNode) {
if (child.name === "light") { const label = lvNode.getComponent(Label);
child.active = false; if (label) {
} else if (child.name === "bg") { label.string = `lv.${lv}`;
child.active = true; }
} else {
child.active = (child.name === poolLvStr);
} }
});
const widget = this.pool_lv_node.getComponent(Widget); const widget = this.pool_lv_node.getComponent(Widget);
if (widget) widget.updateAlignment(); if (widget) widget.updateAlignment();
this.pool_lv_node.children.forEach(child => { this.pool_lv_node.children.forEach(child => {