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 }) } }