* System 被销毁的时候调用。 * Called while the system be destroyed.
()
| 119 | * Called while the system be destroyed. |
| 120 | */ |
| 121 | onDestroy() { |
| 122 | this.components.forEach(component => { |
| 123 | component.onDestroy(); |
| 124 | }); |
| 125 | this.components = []; |
| 126 | sound.removeAll(); |
| 127 | } |
| 128 | |
| 129 | async componentChanged(changed: ComponentChanged) { |
| 130 | if (changed.componentName !== 'Sound') return; |