添加加载时遮挡
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { respath } from "./constants/respath"
|
||||
import { DCManager } from "./models/DCManager"
|
||||
import { LevelManager } from "./models/LevelManager"
|
||||
import { ResourceManager } from "./models/ResourceManager"
|
||||
|
||||
@@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user