代码如下:
var child =this.node.children[0];
var partic=child.getComponent(cc.ParticleSystem);
cc.log(partic.active);
partic.active=true;
输出都能正常。为什么 partic.active=true; 就要报错:
Cannot set property active of #<cc_ParticleSystem> which has only a getter