音乐模块添加背景音乐循环播放方法

This commit is contained in:
dgflash
2023-08-28 17:35:53 +08:00
parent 440c478c14
commit d7b3e72b3d

View File

@@ -41,6 +41,14 @@ export class AudioManager extends Component {
}
}
/** 循环播放背景音乐 */
playerMusicLoop(url: string) {
if (this._switch_music) {
this.music.loop = true;
this.music.load(url);
}
}
/**
* 获取背景音乐播放进度
*/