如题,ccc1.6.1b2 使用typescript开发,目前的写法如下:
@property({default:false})
_repeat=false;
@property({displayName:“重复”})
get repeat () {
return this._repeat;
}
@property()
set repeat (value) {
this._repeat = value;
}
@property({default:0,type:cc.Float,displayName: ‘重复次数’,visible:()=>{return this.repeat}})
repeatCount=0;
目的就是想在勾选了重复选项以后,在可以显示重复需要设置的参数。
但是我这样写目前报错如下:
