const { ccclass } = cc._decorator; @ccclass export default class ParticleSystemAutoPlay extends cc.Component { onEnable() { let sys = this.getComponent(cc.ParticleSystem); if (sys != null) { sys.stopSystem(); sys.resetSystem(); } } }