配置全部转移luban
This commit is contained in:
@@ -9,15 +9,12 @@ import {
|
||||
} from "cc";
|
||||
import li_BaseView from "db://assets/Scripts/Main/Common/li_BaseView";
|
||||
import Utils from "db://assets/Scripts/Main/Common/Utils";
|
||||
import {
|
||||
GirlsData,
|
||||
themes,
|
||||
} from "db://assets/Scripts/Main/Config/cfg/characters";
|
||||
import { GButton } from "db://assets/Scripts/Main/Common/GButton";
|
||||
import ResManager from "db://assets/Scripts/Main/Manager/ResManager";
|
||||
import { ThemeItem } from "./ThemeItem";
|
||||
import { NavigationManager } from "../../manager/NavigationManager";
|
||||
import { GirlListItem } from "./GirlListItem";
|
||||
import ConfigManager from "../../manager/ConfigManager";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -59,9 +56,10 @@ export class ThemePanel extends li_BaseView {
|
||||
this.cache[i].node.destroy();
|
||||
}
|
||||
}
|
||||
const config = themes;
|
||||
for (let i = 0; i < config.length; i++) {
|
||||
const cfg = config[i];
|
||||
const cfgs = ConfigManager.tables.TbThemes.getDataList();
|
||||
for (let i = 0; i < cfgs.length; i++) {
|
||||
const cfg = cfgs[i];
|
||||
if (!cfg) return;
|
||||
let newNode = instantiate(this.itemInst.node);
|
||||
let item = newNode.getComponent(ThemeItem);
|
||||
item.refresh(cfg);
|
||||
@@ -70,12 +68,12 @@ export class ThemePanel extends li_BaseView {
|
||||
this.content.addChild(newNode);
|
||||
}
|
||||
|
||||
const rectInfo = GirlsData[0];
|
||||
const rectInfo = cfgs[0];
|
||||
this.recId = rectInfo.id;
|
||||
this.recName.string = rectInfo.name;
|
||||
ResManager.I.changeBundleSpriteFrame(
|
||||
this.recSprite,
|
||||
rectInfo.pic.url,
|
||||
rectInfo.path,
|
||||
"Chat18x",
|
||||
() => {
|
||||
let sizeTran = this.recSprite.node.parent.getComponent(UITransform);
|
||||
|
||||
Reference in New Issue
Block a user