Files
fc/dev/project/library/imports/e2/e206478a-52cf-4666-b68a-4318b753c29f.js
T
2026-05-24 10:21:26 +08:00

59 lines
1.4 KiB
JavaScript

"use strict";
cc._RF.push(module, 'e2064eKUs9GZraKQxi3U8Kf', 'cmp.item.glow');
// Scripts/mod/backpack/cmps/cmp.item.glow.js
"use strict";
/******************************************************************
* Copyright(C) 2019 - 2020 Nx Studio
*
* 道具图标 --- 发光扩展
*
*
******************************************************************/
var ItemBase = require("cmp.item.base");
var FxSpine = require("nx.fx.spine");
cc.Class({
"extends": ItemBase,
properties: {
spGlow: {
"default": null,
type: FxSpine
},
cmpIcon: {
"default": null,
type: cc.Node
}
},
// 置空
setEmpty: function setEmpty() {
this._super();
if (this.spGlow) {
this.spGlow.stop();
}
},
// 发光显示
glowShow: function glowShow() {
if (this.spGlow) {
this.spGlow.action("action", false);
}
nx.tween.delayFadeIn(this.cmpIcon, "", 0.3, 0.2, null, 255, 180);
},
// 设置阵营
setCamp: function setCamp(_camp) {
if (!this.imgLT) {
return;
}
var cfg = game.configs.partner_data.data_partner_base[this.info.bid];
if (cfg) {
var career = game.configs.partner_data.data_partner_base[this.info.bid].type;
if (career) {
var sf = cc.path.join("coms/images/career" + career);
nx.gui.setSpriteFrame(this.imgLT, "", sf);
}
}
}
});
cc._RF.pop();