"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();