pubgv3/assets/scripts/UI/bag/cellbag.js
zhuguoqing 53febf2dc4 update
2022-05-28 10:31:45 +08:00

32 lines
672 B
JavaScript

let viewCell = require("viewCell")
cc.Class({
extends: viewCell,
properties: {
nd_items: {
default: [],
type: cc.Node,
},
},
// LIFE-CYCLE CALLBACKS:
// onLoad () {},
init: function(index, data, reload, group) {
if (index >= data.array.length) {
this.node.active = false
return;
}
this.target = data.target
var sdata = data.array[index]
for(var i=0;i<this.nd_items.length;i++){
this.nd_items[i].getComponent("oneshopitem").initdata(sdata[i])
}
},
// update (dt) {},
});