"use strict"; cc._RF.push(module, 'e8dd6cv1nZKTKVDLmpLGia4', 'cmp.holy.pray.rate'); // Scripts/mod/pray/cmp/cmp.holy.pray.rate.js "use strict"; var BridgeWindow = require("bridge.window"); cc.Class({ "extends": BridgeWindow, properties: { nodRate: { "default": null, type: cc.Node }, nodNowLevel: { "default": null, type: cc.Node }, nodNextLevel: { "default": null, type: cc.Node } }, // 重载:参数打开 onOpenConfigs: function onOpenConfigs(_params) { this.freshInfo(_params); }, freshInfo: function freshInfo(_params) { this.lev = _params.lev; this.group_id = _params.group_id; var cfg = game.configs.holy_eqm_lottery_data.data_pro_show[this.lev]; var nfg = game.configs.holy_eqm_lottery_data.data_pro_show[this.lev + 1]; var rates = []; for (var i in cfg) { var rate = cfg[i]; rates.push(rate); } var nrates = []; for (var _i in nfg) { var _rate = nfg[_i]; nrates.push(_rate); } nx.gui.gocChildren(this.nodRate, "", rates.length); var chd = this.nodRate.children; for (var _i2 = 0; _i2 < chd.length; _i2++) { var nod = chd[_i2]; var _rate2 = rates[_i2]; if (_rate2) { nx.gui.setString(nod, "name", _rate2.name); nx.gui.setString(nod, "rate", _rate2.pro + "%"); nx.gui.setString(nod, "next", nrates[_i2].pro + "%"); } } nx.gui.setString(this.nodNowLevel, "", nx.text.format("StatueNowLv", this.lev)); nx.gui.setString(this.nodNextLevel, "", nx.text.format("NextLevel", this.lev + 1)); } }); cc._RF.pop();