添加预制预加载逻辑

This commit is contained in:
2025-06-05 17:00:48 +08:00
parent 609b952823
commit ee54b50bb5
12 changed files with 1757 additions and 1685 deletions

View File

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