JM_KA/assets/Script/Engine/Component/ParticleSystem/ParticleSystemAutoPlay.ts
2022-08-26 16:48:17 +08:00

15 lines
307 B
TypeScript

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();
}
}
}