var self;
cc.Class({
properties: () => ({
length: 10,
}),
ctor: function () {
self = this;
...
},
testA: function () {
self.length = 9;
},
testB: function () {
self.length = 11;
},
});
是这么写么, 我想把self变成const, 但不知道怎么弄