37 lines
710 B
JavaScript
37 lines
710 B
JavaScript
|
|
const PathTool = require("pathtool");
|
||
|
|
cc.Class({
|
||
|
|
extends: cc.Component,
|
||
|
|
|
||
|
|
properties: {
|
||
|
|
roleSp:{
|
||
|
|
default:null,
|
||
|
|
type:cc.Node
|
||
|
|
},
|
||
|
|
nameTxt:{
|
||
|
|
default:null,
|
||
|
|
type:cc.Node
|
||
|
|
},
|
||
|
|
},
|
||
|
|
|
||
|
|
// LIFE-CYCLE CALLBACKS:
|
||
|
|
|
||
|
|
// onLoad () {},
|
||
|
|
|
||
|
|
start () {
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
setRoleSp(sp_skill_bid){
|
||
|
|
if(!sp_skill_bid)return;
|
||
|
|
let role_icon = game.configs.sprite_data.data_elfin_skill_icon[ sp_skill_bid ];
|
||
|
|
let path = PathTool.queryIconPath(role_icon);
|
||
|
|
nx.gui.setSpriteFrame(this.roleSp,"",path);
|
||
|
|
},
|
||
|
|
|
||
|
|
setNameString(_skill){
|
||
|
|
nx.gui.setString(this.nameTxt,"",_skill);
|
||
|
|
},
|
||
|
|
|
||
|
|
// update (dt) {},
|
||
|
|
});
|