Files

47 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

2026-05-24 10:21:26 +08:00
"use strict";
cc._RF.push(module, 'f1ae4B3gWxCG7+6Weceo0cS', 'cmp.heaven.award');
// Scripts/mod/pve/heaven/cmp/cmp.heaven.award.js
"use strict";
var BridgeWindow = require("bridge.window");
var HEACT = require("heaven_controller");
var NxExpand = require("nx.fx.sv.expand");
var HeavenEvent = require("heaven_event");
cc.Class({
"extends": BridgeWindow,
properties: {
list: {
"default": null,
type: NxExpand
}
},
// LIFE-CYCLE CALLBACKS:
onLoad: function onLoad() {
this.ctrl = HEACT.getInstance();
this.model = this.ctrl.getModel();
//獎勵刷新
this.bindGEvent(HeavenEvent.Refresh_Chapter_Award_Event, this.refreshAwards.bind(this));
},
start: function start() {},
onOpenConfigs: function onOpenConfigs(params) {
this.chapter_id = params.id;
this.refreshAwards();
},
refreshAwards: function refreshAwards() {
var award_list = [];
var award_info = game.configs.dungeon_heaven_data.data_star_award[this.chapter_id];
if (award_info) {
for (var i in award_info) {
var data = award_info[i];
award_list.push(data);
}
}
this.list.rebuild(award_list);
},
onPreClosed: function onPreClosed() {
this.list.rebuild([]);
} // update (dt) {},
});
cc._RF.pop();