pubgv3/assets/scripts/UI/iconset.js
zhuguoqing bc1d37b98a update
2022-05-25 21:16:26 +08:00

33 lines
528 B
JavaScript

var Utils = require('Utils');
cc.Class({
extends: cc.Component,
properties: {
lb_name: {
default: null,
type: cc.Label,
},
sp_icon: {
default: null,
type: cc.Sprite,
},
sp_frame: {
default: null,
type: cc.Sprite,
},
},
// LIFE-CYCLE CALLBACKS:
// onLoad () {},
start() {},
initdata(obj) {
this.lb_name.string = obj.name;
Utils.setitem(this, obj.headid, this.sp_icon);
Utils.setitem(this, obj.head_frame, this.sp_frame);
},
// update (dt) {},
});