From 367d40d4b01373aac5632173b3f9f2bbee6bd49b Mon Sep 17 00:00:00 2001 From: yangwen Date: Wed, 28 May 2025 17:00:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E7=A9=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models/UIManager.ts | 2 +- src/views/dc/DailyChallenge.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/UIManager.ts b/src/models/UIManager.ts index 96c6e09..4c08b5e 100644 --- a/src/models/UIManager.ts +++ b/src/models/UIManager.ts @@ -31,7 +31,7 @@ export class UIManager extends Laya.Script { private UIRoot: Laya.Panel public getUIRoot(): Laya.Node { - if (this.UIRoot == null) { + if (!this.UIRoot) { this.UIRoot = this.owner.getChildByName("UIRoot") as Laya.Panel if (config.H_SCREEN) { this.UIRoot.width = config.DESIGN_HEIGHT diff --git a/src/views/dc/DailyChallenge.ts b/src/views/dc/DailyChallenge.ts index 1656264..dc4a0ab 100644 --- a/src/views/dc/DailyChallenge.ts +++ b/src/views/dc/DailyChallenge.ts @@ -231,7 +231,7 @@ export class DailyChallenge extends Laya.Script { unit.label_show.visible = false } } - if (this.selectedUnit == null) + if (!this.selectedUnit) this.selectedUnit = this.units[info.begin+info.dayCount-1] this.onApplyUnit(this.selectedUnit) }