From c2726c790a4d948b181591f365990893e7783f43 Mon Sep 17 00:00:00 2001 From: yangwen Date: Thu, 5 Jun 2025 15:14:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=A0=E8=BD=BD=E6=97=B6?= =?UTF-8?q?=E9=81=AE=E6=8C=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Main.ts | 1 - src/models/UIManager.ts | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Main.ts b/src/Main.ts index ffbe819..b896ae4 100644 --- a/src/Main.ts +++ b/src/Main.ts @@ -1,4 +1,3 @@ -import { respath } from "./constants/respath" import { DCManager } from "./models/DCManager" import { LevelManager } from "./models/LevelManager" import { ResourceManager } from "./models/ResourceManager" diff --git a/src/models/UIManager.ts b/src/models/UIManager.ts index ddec519..dcab786 100644 --- a/src/models/UIManager.ts +++ b/src/models/UIManager.ts @@ -186,26 +186,32 @@ export class UIManager extends Laya.Script { } public loadGamePauseUI(doStage: DOStage): void { + this.mask.visible = true Laya.loader.load(respath.gamepause_ui_res()).then((go) => { const prefab = go.create() const ui = this.getUIRoot().addChild(prefab).getComponent(GamePause) ui.onSetStageInfo(doStage) + this.mask.visible = false }) } public loadGameOverUI(doStage: DOStage): void { + this.mask.visible = true Laya.loader.load(respath.gameover_ui_res()).then((go) => { const prefab = go.create() const ui = this.getUIRoot().addChild(prefab).getComponent(GameOver) ui.onSetStageInfo(doStage) + this.mask.visible = false }) } public loadGameDoneUI(isClassic: boolean, doStage: DOStage): void { + this.mask.visible = true Laya.loader.load(respath.gamedone_ui_res(isClassic)).then((go) => { const prefab = go.create() const ui = this.getUIRoot().addChild(prefab).getComponent(GameDone) ui.onSetStageInfo(doStage) + this.mask.visible = false }) } }