为一个属性设置了setter/getter, 为什么就不能在ide(cocos creator) 中直接设置属性值了?
试出来一种方法, 见代码
_ly: {
default: 0,
visible: false,
},
ly: {
get: function () {
return this._ly;
},
set: function (value) {
this._ly = value;
this.node.y = this._ly * this.factor;
},
},