15 lines
307 B
TypeScript
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();
|
|
}
|
|
}
|
|
}
|