64 lines
1.7 KiB
JavaScript
64 lines
1.7 KiB
JavaScript
"use strict";
|
|
cc._RF.push(module, 'af6dbbi2HlEq7lUpMlwLcCM', 'cmp.reform.upstar.inbag');
|
|
// Scripts/mod/partner/cmps/reform/cmp/cmp.reform.upstar.inbag.js
|
|
|
|
"use strict";
|
|
|
|
var ItemBase = require("cmp.item.base");
|
|
var BackPackConst = require("backpack_const");
|
|
var HeroController = require("hero_controller");
|
|
var HeroEvent = require("hero_event");
|
|
cc.Class({
|
|
"extends": ItemBase,
|
|
properties: {
|
|
tips: {
|
|
"default": null,
|
|
type: cc.Node
|
|
}
|
|
},
|
|
// 重载:刷新
|
|
freshAll: function freshAll() {
|
|
this._super();
|
|
var nod = nx.gui.find(this, "qa");
|
|
var cfg = game.configs.partner_data.data_partner_base[this.mdata.bid];
|
|
if (nod && cfg) {
|
|
var path = cfg.quality != 1 ? "coms/images/mk_sqa" + cfg.quality : null;
|
|
nx.gui.setSpriteFrame(nod, "", path);
|
|
nx.gui.setActive(nod, "", true);
|
|
}
|
|
this.freshTip();
|
|
},
|
|
// 置空
|
|
setEmpty: function setEmpty() {
|
|
this._super();
|
|
var nod = nx.gui.find(this, "qa");
|
|
if (nod) {
|
|
nx.gui.setActive(nod, "", false);
|
|
}
|
|
},
|
|
// 设置阵营
|
|
setCamp: function setCamp(_camp) {
|
|
if (!this.imgLT) {
|
|
return;
|
|
}
|
|
var sf = cc.path.join("coms/images/career" + this.mdata.type);
|
|
nx.gui.setSpriteFrame(this.imgLT, "", sf);
|
|
// if( this.key == "partner" ){
|
|
// let sf = cc.path.join( "coms/images/career" + this.mdata.type );
|
|
// nx.gui.setSpriteFrame( this.imgLT, "", sf );
|
|
// }else{
|
|
// let sf = cc.path.join( "coms/images/camps" + _camp );
|
|
// nx.gui.setSpriteFrame( this.imgLT, "", sf );
|
|
// }
|
|
},
|
|
|
|
// 重载 选中效果显示
|
|
onFocus: function onFocus() {
|
|
this.nodFocus.node.active = true;
|
|
},
|
|
freshTip: function freshTip() {
|
|
nx.gui.setActive(this.tips, "", this.mdata.result.is_redpoint);
|
|
}
|
|
});
|
|
|
|
cc._RF.pop(); |