Files
fc/dev/project/library/imports/ee/ee0b30de-21bd-4ea4-bcd5-97011212d675.js
2026-05-24 10:21:26 +08:00

48 lines
1.3 KiB
JavaScript

"use strict";
cc._RF.push(module, 'ee0b3DeIb1OpLzVlwESEtZ1', 'cmp.campfight.report');
// Scripts/mod/pvp/campfight/cmp/cmp.campfight.report.js
"use strict";
var CampfightConst = require("campfight.const");
var CampfightMod = require("campfight.mod");
var BridgeCmp = require("bridge.component");
var NxSpine = require("nx.fx.sv.expand");
cc.Class({
"extends": BridgeCmp,
properties: {
reportList: {
"default": null,
type: NxSpine
}
},
// LIFE-CYCLE CALLBACKS:
onLoad: function onLoad() {
this._super();
this.mod = CampfightMod.getInstance();
this.bindGEvent(CampfightConst.EVT_CAMP_REPORT, this.freshLists.bind(this));
},
freshLists: function freshLists(data) {
if (nx.dt.objEmpty(data)) return;
this.reportList.rebuild(data.replay_list);
},
setCurGroup: function setCurGroup(group) {
this.cur_group = group;
},
onEnable: function onEnable() {
//请求录像
this.mod.reqReportList(this.cur_group || this.mod.getGroup());
},
onDisable: function onDisable() {
this.reportList.rebuild([]);
},
onDestroy: function onDestroy() {
// 监听事件释放
this.unbindGEvents();
},
onCloseView: function onCloseView() {
this.node.active = false;
} // update (dt) {},
});
cc._RF.pop();