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) {
|
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 => {
|
||||||
|
|||||||
Reference in New Issue
Block a user