添加预制预加载逻辑
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { respath } from "../constants/respath"
|
||||
import { ResourceManager } from "../models/ResourceManager"
|
||||
import { UIManager } from "../models/UIManager"
|
||||
|
||||
const { regClass, property } = Laya
|
||||
|
||||
export function G_ShowCommonTips(title: string, content: string, showToggle: boolean, func: any): void {
|
||||
Laya.loader.load(respath.common_tips_ui_res).then((go) => {
|
||||
ResourceManager.getInstance().loadPrefab(respath.common_tips_ui_res, (go: any)=> {
|
||||
const prefab = go.create()
|
||||
const obj = UIManager.getInstance().getUIRoot().addChild(prefab).getComponent(CommonTips)
|
||||
obj.showCommonTips(title, content, showToggle, func)
|
||||
|
||||
Reference in New Issue
Block a user