cc.Class({
extends: cc.Component,
properties: {
att1: 0,
att2: “”,
testArr: [],
structArr: {
default: function(){
return [1,2,3,4,5];
},
serializable: true,
type: [cc.Integer],
arrLenght: 5,
getLenght(){
return this.arrLenght;
},
},
start () {
cc.log("=======>>att1:" + this.att1);
cc.log("=======>>att2:" + this.att2 );
},
)}
这三个都没问题 att1 att2 testArr
怎么才能拿到structArr里的lenght
this.structArr.getlenght()?这样写不对
这是啥写法????


