pubgv3/assets/scripts/UI/iconset.js
zhuguoqing ff550d5d6a init
2022-05-22 10:32:02 +08:00

34 lines
661 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) {},
});