"use strict"; cc._RF.push(module, 'b62f5R36MxDrLaRZtWvbRf+', 'cmp.campfight.report.item'); // Scripts/mod/pvp/campfight/cmp/cmp.campfight.report.item.js "use strict"; var ItemBase = require("nx.fx.sv.expand.item"); var CampfightMod = require("campfight.mod"); var BCT = require("battle_controller"); cc.Class({ "extends": ItemBase, properties: { leftNd: { "default": null, type: cc.Node }, rightNd: { "default": null, type: cc.Node } }, // LIFE-CYCLE CALLBACKS: rebind: function rebind(_index, _data, _key) { this._super(_index, _data, _key); this.setData(_data); }, setData: function setData(data) { if (nx.dt.objEmpty(data)) { return; } nx.gui.setString(this.leftNd, "name", data.name1); nx.gui.setString(this.leftNd, "num", data.rank1); nx.gui.setString(this.rightNd, "name", data.name2); nx.gui.setString(this.rightNd, "num", data.rank2); if (data.is_win == 1) { nx.gui.setActive(this, "win", true); } else { nx.gui.setActive(this, "lose", true); } }, onClickReplay: function onClickReplay() { if (this.mdata) { BCT.getInstance().sender_20036(this.mdata.replay_id, this.mdata.replay_srv_id); } } }); cc._RF.pop();