添加预制预加载逻辑

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

@@ -2,6 +2,7 @@ import { config } from "../../constants/config"
import { respath } from "../../constants/respath"
import { MONTH_LIST } from "../../models/DCManager"
import { EVENT_TYPES, EventManager } from "../../models/EventManager"
import { ResourceManager } from "../../models/ResourceManager"
import { UIManager } from "../../models/UIManager"
import { TrophyUnit } from "./TrophyUnit"
@@ -55,7 +56,7 @@ export class TrophyRoom extends Laya.Script {
list.push(obj)
}
console.log(">>>>>>>>>>>>years=", years)
Laya.loader.load(respath.trophy_year_ui_res()).then((go) => {
ResourceManager.getInstance().loadPrefab(respath.trophy_year_ui_res(), (go: any)=> {
for (let i = 1; i < years.length; i++) {
const obj_year = this.obj_items.getChildAt(i)
if (!obj_year) {
@@ -64,7 +65,7 @@ export class TrophyRoom extends Laya.Script {
}
}
Laya.loader.load(respath.trophy_cell_ui_res()).then((go) => {
ResourceManager.getInstance().loadPrefab(respath.trophy_cell_ui_res(), (go: any)=> {
let itemsHeight = 0
for (let i = 0; i < years.length; i++) {
const list = monthMap.get(years[i])