修复背景音乐关闭时,当前音乐未关问题

This commit is contained in:
dgflash
2025-09-23 14:27:57 +08:00
parent 7a90ec71ad
commit de0df725c4

View File

@@ -165,9 +165,7 @@ export class AudioMusic extends Node {
/** 停止当前音乐与音效的播放 */
stop(): void {
if (this.getSwitch() && this._ae.playing) {
this._ae.stop();
}
if (this._ae.playing) this._ae.stop();
}
/** 释放当前背景音乐资源 */