private _width = 100;
@property
private get width() {
return this._width;
}
private set width(value: number) {
warn("set width");
this._width = value;
}
是我的写法有问题吗?
set方法我在inspector输入的时候调用了两次,回车又调用了4次
ccclass文档里的set方法为什么是定义在类上的?我试了一下并不行