Files
fc/dev/project/assets/Scripts/mod/pve/heaven/cmp/cmp.heaven.chapter.js
T

42 lines
846 B
JavaScript
Raw Normal View History

2026-05-23 22:10:14 +08:00
const BridgeWindow = require( "bridge.window" );
const HEACT = require("heaven_controller");
const NxExpand = require("nx.fx.sv.expand");
cc.Class({
extends: BridgeWindow,
properties: {
list:{
default:null,
type:NxExpand
}
},
// LIFE-CYCLE CALLBACKS:
onLoad () {
this.ctrl = HEACT.getInstance();
this.model = this.ctrl.getModel();
},
start () {
},
onOpenConfigs(params) {
let chapter_list = [];
let chapter_datas = game.configs.dungeon_heaven_data.data_chapter;
for(let i in chapter_datas){
let data = chapter_datas[i];
chapter_list.push(data);
}
this.list.rebuild(chapter_list);
},
onPreClosed() {
this.list.rebuild([]);
},
// update (dt) {},
});