继续补充横屏逻辑
This commit is contained in:
@@ -11,6 +11,7 @@ import { DOStage } from "./DOStage"
|
||||
import { GamePause } from "../views/GamePause"
|
||||
import { GameOver } from "../views/GameOver"
|
||||
import { GameDone } from "../views/GameDone"
|
||||
import { TopBar } from "../views/TopBar"
|
||||
|
||||
|
||||
const { regClass, property } = Laya
|
||||
@@ -44,7 +45,7 @@ export class UIManager extends Laya.Script {
|
||||
return this.UIRoot
|
||||
}
|
||||
|
||||
|
||||
private topbar : TopBar
|
||||
private stage: Stage
|
||||
private dc_ui: DailyChallenge
|
||||
private trophyRoom: TrophyRoom
|
||||
@@ -70,9 +71,14 @@ export class UIManager extends Laya.Script {
|
||||
public loadTopBarUI(): void {
|
||||
Laya.loader.load(respath.topbar_ui_res).then((go)=>{
|
||||
var prefab = go.create()
|
||||
this.getUIRoot().addChild(prefab)
|
||||
this.topbar = this.getUIRoot().addChild(prefab).getComponent(TopBar)
|
||||
})
|
||||
}
|
||||
public setTopbarTo(isClassic: boolean): void {
|
||||
if (this.topbar) {
|
||||
this.topbar.onClickTab(isClassic)
|
||||
}
|
||||
}
|
||||
|
||||
public loadDCUI(): void {
|
||||
Laya.loader.load(respath.dc_ui_res()).then((go)=>{
|
||||
|
||||
Reference in New Issue
Block a user