Files
fc/dev/project/library/imports/40/40dee524-0821-4c85-b45d-b33907cff7b5.js
T
2026-05-24 10:21:26 +08:00

71 lines
1.7 KiB
JavaScript

"use strict";
cc._RF.push(module, '40deeUkCCFMhbRdszkHz/e1', 'cmp.adventure.more');
// Scripts/mod/pve/adventure/cmp/cmp.adventure.more.js
"use strict";
var BridgeWindow = require("bridge.window");
var ADVCT = require("adventure_controller");
var ADEVT = require("adventure_event");
var NxExpand = require("nx.fx.sv.expand");
cc.Class({
"extends": BridgeWindow,
properties: {
ti1: {
"default": null,
type: cc.Node
},
ti2: {
"default": null,
type: cc.Node
},
buffNod: {
"default": null,
type: cc.Node
},
goodsNod: {
"default": null,
type: cc.Node
},
buffList: {
"default": null,
type: NxExpand
},
goodsList: {
"default": null,
type: NxExpand
}
},
// LIFE-CYCLE CALLBACKS:
onLoad: function onLoad() {
this.ctrl = ADVCT.getInstance();
this.bindGEvent(ADEVT.Update_More_Item, this.updateItems.bind(this));
},
start: function start() {},
updateItems: function updateItems(list) {
this.list = list;
this.refreshList();
},
onOpenConfigs: function onOpenConfigs(params) {
this.type = params.type;
this.list = params.list || [];
this.refreshList();
},
onPreClosed: function onPreClosed() {
this.buffList.rebuild([]);
this.goodsList.rebuild([]);
},
refreshList: function refreshList() {
this.ti1.active = this.type == 1;
this.ti2.active = this.type == 2;
this.buffNod.active = this.type == 1;
this.goodsNod.active = this.type == 2;
if (this.type == 1) {
this.buffList.rebuild(this.list);
} else {
this.goodsList.rebuild(this.list);
}
} // update (dt) {},
});
cc._RF.pop();