"use strict"; cc._RF.push(module, 'f32ff9WXn5JcIB+flEonyWc', 'cmp.campfight.place'); // Scripts/mod/pvp/campfight/cmp/cmp.campfight.place.js "use strict"; var CampfightMod = require("campfight.mod"); var BridgeWindow = require("bridge.window"); cc.Class({ "extends": BridgeWindow, properties: { item: { "default": null, type: cc.Node }, txtNd: { "default": null, type: cc.Node }, headTag: { "default": null, type: cc.Node }, fabHead: { "default": null, type: cc.Prefab } }, // LIFE-CYCLE CALLBACKS: onLoad: function onLoad() { this.mod = CampfightMod.getInstance(); }, onOpenConfigs: function onOpenConfigs(params) { var data = params.data; if (data) { if (!this.rankHead) { this.rankHead = cc.instantiate(this.fabHead); this.rankHead.parent = this.headTag; } var cmp = nx.gui.getComponent(this.rankHead, "", "cmp.common.header"); if (cmp) { cmp.setData(data); } nx.gui.setActive(this.txtNd, String(data.rank), true); nx.gui.setActive(this.item, String(data.rank), true); nx.gui.setString(this.item, "name", data.name); nx.gui.setString(this.item, "vip/txt", data.vip); var honor_cfg = game.configs.honor_data.data_title[data.honor]; if (honor_cfg && honor_cfg.res_id) { nx.gui.setSpriteFrame(this.item, "honor", cc.js.formatStr("resDB/honors/%s", honor_cfg.res_id)); } } }, onPreClosed: function onPreClosed() {} }); cc._RF.pop();