23 lines
436 B
JavaScript
23 lines
436 B
JavaScript
var Utils = require("Utils")
|
|
cc.Class({
|
|
extends: cc.Component,
|
|
|
|
properties: {
|
|
sp_icon: {
|
|
default: null,
|
|
type: cc.Sprite,
|
|
},
|
|
lb_count: {
|
|
default: null,
|
|
type: cc.Label,
|
|
},
|
|
},
|
|
|
|
|
|
initdata(v) {
|
|
Utils.setitem(this, v.item_id, this.sp_icon)
|
|
this.lb_count.string = v.item_num
|
|
},
|
|
|
|
// update (dt) {},
|
|
}); |